Open autopulated opened 9 years ago
huh, that's weird, its in a virtualenv, will need to look into that. Think I may have set PATH=YOTTA_PATH:PATH
. If you want to take a look at the activate script I would love some help, a wee bit out of my depth as I'm not a usual OSX user.
hrmm, definitely weird, did a standard virtualenv install, wonder why that didn't get pulled in.
PR's welcome!
So sys.path does include the corresponding virtualenv dirs before the system ones, but because those directories are empty the modules get loaded from the system ones.
I think all that's necessary to fix this is make sure that yotta.app/Contents/Resources/workspace/lib/python2.7
gets the python standard libs included.
any idea how to do that? I thought it'd be copied across by creating the virtualenv, is there an extra command option at virtualenv creation time i need to run?
Maybe this helps? http://stackoverflow.com/a/19459977/233201, and possibly this http://stackoverflow.com/a/11301911/233201?
But basically I have no idea – I didn't know virtualenvs could be made portable!
Need to setup virtualenv using the following commands
virtualenv --system-site-packages <workspace name>
pip install -I <package name>
While the python executable is set to
yotta.app/Contents/Resources/workspace/bin/python
, if you runpython -c "import sys; print sys.path"
inside the yotta workspace then you'll still see system python lib directories.Further, if you look in the contents of:
yotta.app/Contents/Resources/workspace/lib/python2.7
And compare it to your system's python lib dir (probably
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
), you'll notice that most of the standard library is missing.I believe this is why it seemed like requests[security] is needed even with python >= 2.7.9.