[Distutils] virtualenv & pypi-server

Andrea Crotti andrea.crotti.0 at gmail.com
Mon Oct 31 12:49:34 CET 2011


On 10/27/2011 06:17 PM, PJ Eby wrote:
> Properly reloading changed code is a lot more complex than that. 

Ah well it would be nice maybe but it's not so important, and maybe even 
Envisage can do something like that.

Anyway I was trying a simple example of using "easy_install -m", to see 
how it works.

I create a minimal library and install it with "-m", so in theory I 
thought that I can require
it and then use it and I do:
In [15]: pkg_resources.require('lib')
Out[15]: [lib 0.1 
(/home/andrea/.local/lib/python2.7/site-packages/lib-0.1-py2.7.egg)]

But then
"import lib" or "from lib import module" both fail, so am I missing 
anything else?

As you said in the other email if I have a setup.py I would not even 
that, but how do I do in practice?

I tried to do an
"easy_install --user -i . foolproof"
and foolproof actually has "lib" in install_requires.

Now "lib" is already correctly installed with the "multiversion" option, 
but then if I try to run
the script in foolproof (the installed one) I still can't import "lib".

Anything else I should do?


More information about the Distutils-SIG mailing list