Using virtualenv to bypass sudoer issues

Asaf Las roegltd at gmail.com
Sat Feb 8 05:31:27 CET 2014


On Saturday, February 8, 2014 5:32:22 AM UTC+2, Cameron Simpson wrote:
> On 07Feb2014 19:03, Asaf Las <r..... at gmail.com> wrote:
> 
> Persuming you are asking about "just make a lib directory and point
> $PYTHONPATH at it" instead of virtualenv, in principle yes.
> But it is more work; virtualenv is essentially a well standardised and more
> thorough version.
> 
> Most such mixed packages install with a setup.py that compiles the
> relevant bits, and you'll need to tell setup.py where to install
> things, so it is not as easy as just copying in the files.
> 
> I think such packages are about the point where I would consider
> virtualenv; once you have the virtualenv set up, installing packages
> is more automatic.
> 
> For pure python packages, just copying them into your personal lib
> works well, and is very simple. As soon as you get mixed packages,
> it is probably more worthwhile to use virtualenv. I think.
> 
> Virtualenv looks like a bit of a leap to set up to start with, but
> I found it easier than I expected. As I recall, you can do two basic
> types of virtualenv: a "complete" one which installs copies of all
> the system packages, or a much smaller one that itself hooks into
> the system python packages.
> 
> 
> Cheers,
> 
> Cameron Simpson <cs at zip.com.au>

Thanks 

still there are changes 
http://docs.python.org/3.4/library/venv.html

i hope one day it will be possible to deploy app over net 
by just unpacking tar ball done at test machine on production 
one, though this seems questionable:
http://www.virtualenv.org/en/latest/virtualenv.html#making-environments-relocatable

it might be for some packages relying on 3rd party libs such as lxml, root 
account had to be provided. 
or may be there are some acceptable hacks similar to patching 
RPATH on bin's? 

Regards

Asaf



More information about the Python-list mailing list