Skip to content

Conversation

@gonzalocasas
Copy link
Member

@gonzalocasas gonzalocasas commented Mar 25, 2019

Conda environments need to add some things to the PATH when activated, at least on Windows. This fixes it for XFunc and RPC calls (report on Forum).

What type of change is this?

  • Bug fix in a backwards-compatible manner.
  • New feature in a backwards-compatible manner.
  • Breaking change: bug fix or new feature that involve incompatible API changes.

Checklist

  1. Add the change to the CHANGELOG.md file.
  2. Run all tests on your computer (i.e. invoke test).

@gonzalocasas gonzalocasas requested a review from tomvanmele March 25, 2019 07:14
@gonzalocasas
Copy link
Member Author

I think this is required to be released before Wednesday's compas_fea workshop, because some participants already have the requirements installed in an conda environment.

Copy link
Member

@tomvanmele tomvanmele left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • NotADirectoryError does not exist in Python 2.7 (at least not on Mac).
  • Tried a fresh rpc environment and RhinoMac seems to be able to find the correct Python
  • For now on Mac (because of Matplotlib) the command to install and uninstall should be pythonw -m compas_rhino.xxx
  • it seems that on mac the equivalent of PYTHON_DIRECTORY, 'Library', 'bin' would have to be PYTHON_DIRECTORY, 'lib'
  • To add environment variables, the equivalent using the Windows Process.StartInfo would be self._process.StartInfo.EnvironmentVariables = env

@gonzalocasas
Copy link
Member Author

NotADirectoryError does not exist in Python 2.7 (at least not on Mac).

where do you see that one? did i add it now?

For now on Mac (because of Matplotlib) the command to install and uninstall should be pythonw -m compas_rhino.xxx

Before changing that, I would ask why does matplotlib play a role when installing for rhino? Do you have one import too many somewhere?

it seems that on mac the equivalent of PYTHON_DIRECTORY, 'Library', 'bin' would have to be PYTHON_DIRECTORY, 'lib'

thx, I wasn't sure and I didn't have a mac to test, I'll add it.

To add environment variables, the equivalent using the Windows Process.StartInfo would be self._process.StartInfo.EnvironmentVariables = env

thx! will add that

@tomvanmele
Copy link
Member

you are right about the plotters. they should not have an effect on this process.

andrew's devo stuff imports matplotlib for some implicit plotting which should be handled through a callback. will ask him to change that...

the NotADirectoryError is part of the remove_symlink function. apparently i had never run in to that problem in a py2-based environment before...

@tomvanmele tomvanmele merged commit e7b56e6 into master Mar 25, 2019
@tomvanmele tomvanmele deleted the numpy-xfunc branch March 27, 2019 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants