5

I am running canopy 64 bit Version: 1.0.3.1262 on mac Mountain Lion. I have installed virtualenv using easy_install. But while I am trying to execute the command:

virtualenv venv --distribute

It shows the following error:

Using base prefix '/Applications/Canopy.app/appdata/canopy-1.0.3.1262.macosx-x86_64/Canopy.app/Contents'
New python executable in venv/bin/python
dyld: Library not loaded: @rpath/Python
Referenced from: /Users/xxx/Desktop/untitled folder 2/venv/bin/python
Reason: image not found
ERROR: The executable venv/bin/python is not functioning
ERROR: It thinks sys.prefix is u'/Users/xxx/Desktop/untitled folder 2' (should be u'/Users/xxx/Desktop/untitled folder 2/venv')
ERROR: virtualenv is not compatible with this system or executable 

Have any one had similar issue and solved it? Thank you in advance for valuable advice.

Undo
  • 25,519
  • 37
  • 106
  • 129

1 Answers1

3

Canopy uses venv instead of virtualenv

Try setting up your environment like so:

venv -s path/to/virtual_environment_dir

Taken from: https://support.enthought.com/entries/21802240-Use-venv-not-virtualenv-with-Canopy-Python

or if you want to set up an environment without the system site packages: Setting up a virtural enviroment (venv) with no system site packages

Community
  • 1
  • 1
Ben
  • 6,986
  • 6
  • 44
  • 71
  • I fixed the problem. You need to specify the path of `venv` as well. –  Jun 09 '14 at 13:22
  • So the command should look like: `/Users/vessilli/Library/Enthought/Canopy_64bit/User/bin/venv flaskapp` –  Sep 06 '14 at 09:54
  • @vessilli venv should automatically point to that location, you shouldn't need to include the full path – Ben Sep 07 '14 at 00:58
  • May be, but in my case, it did not. –  Sep 07 '14 at 00:59