osx - Many Problems with python's virtualenv -


i've been having lot of trouble getting virtualenv work.

first installed via pip , tried setting virtualenv. didn't work , got error message:

    resnets-imac:desktop zachary$ virtualenv anothertest using base prefix '/applications/canopy.app/appdata/canopy-1.5.1.2730.macosx-x86_64/canopy.app/contents' new python executable in anothertest/bin/python dyld: library not loaded: @rpath/python   referenced from: /users/zachary/desktop/anothertest/bin/python   reason: image not found error: executable anothertest/bin/python not functioning error: thinks sys.prefix u'/users/zachary/desktop' (should u'/users/zachary/desktop/anothertest') error: virtualenv not compatible system or executable 

so went through of troubleshooting , decided canopy problem. deleted that, reinstalled virualenv (via 'pip uninstall virtualenv' 'pip install virtualenv') , getting error whenever try involving virtualenv:

dyld: library not loaded: @rpath/python   referenced from: /users/zachary/library/enthought/canopy_64bit/user/bin/python   reason: image not found 

i'm not sure , when check default version of python is, get:

/library/frameworks/python.framework/versions/2.7/bin/python 

i new @ of , don't have idea have been doing or how fix appreciated.

thanks!

the problem have multiple versions of python on system.

you have python ships osx (/library/frameworks/python.framework/versions/2.7/bin/python), have python comes canopy; /users/zachary/library/enthought/canopy_64bit/user/bin/python.

your path pointing default version 1 canopy, yet pip installed against default system version of python.

so when installed virtualenv, installed against default version of python; when try create virtual environment - due way path setup, trying use canopy version of python - , that's source of error.

to solve problem can of following:

  1. remove canopy, , use osx version of python.
  2. install virtualenv on canopy version of python.
  3. modify path system version of python takes precedence.
  4. install version of python (from say, homebrew) , make default.

the resolution chose depend on need system do. if need libraries bundled canopy, need choose option #2, otherwise pick of other options. #4 disruptive (as involve installing lot of other stuff).


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -