0

I'm using Paramiko (which depends on PyCrypto) on Windows in a virtual environment.

Because I'm on Windows, I don't have a C compiler by default, so I got the windows executable from XXX, and installed it using:

workon myenv
easy_install pycrypto-2.6.win32-py2.7.exe
python myscript.py

And everything worked for me.

Now my colleague (Steve) would like to use the same program, so he does:

workon myenv
python myscript.py

and it fails with "ImportError: no module named Crypto". Which is odd. What is odder is that if Steve easy_installs the PyCrypto module, he can use it, but I can't. The library only seems to work for the person who installed it.

Any idea what I'm missing?

Chris Curvey
  • 9,738
  • 10
  • 48
  • 70

1 Answers1

0

You're using virtualenvwrapper, which creates virtualenv directory in .virtualenvs inside users' home directory by default. ([WORKON_HOME][1])

Users' home directories are not shared. So other user cannot use your virtualenv.

Make a virtualenv in a directory that your friend can access.

virtualenv /some/shared/virtualenv-dir

And let other user activate it:

/some/shared/virtualenv-dir/activate

If you want to use virtualenvwrapper, you and other users need to set WORKON_HOME environmental variable to a shared directory. (Not sure this also apply for win32 version of virtualenvwrapper you're using)

falsetru
  • 357,413
  • 63
  • 732
  • 636
  • good thinking (I forget that we're using virtualenvwrapper). sadly, we both have WORKON_HOME=c:\python-envs in our environments. I also had Steve go directly to the scripts directory and "activate", but we're getting the same problem. – Chris Curvey Nov 03 '14 at 15:04