Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #65617

Re: Using virtualenv to bypass sudoer issues

Date 2014-02-08 12:18 +1100
From Cameron Simpson <cs@zip.com.au>
Subject Re: Using virtualenv to bypass sudoer issues
References <1007676733.3292144.1391707932990.JavaMail.root@sequans.com>
Newsgroups comp.lang.python
Message-ID <mailman.6503.1391822294.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 06Feb2014 18:32, Jean-Michel Pichavant <jeanmichel@sequans.com> wrote:
> Assuming I have a debian workstation for which I don't have any
> sudo rights, in order to be able to install / remove python packages,
> should I be using virtualenv ? Is it a suited solution ?

It is well suited.

You can also do far simpler (and far smaller setups) like this:

  mkdir -p $HOME/lib/python

and in your environment (eg $HOME/.profile or $HOME/.bash_profile) add:

  PYTHONPATH=$HOME/lib/python:$PYTHON_PATH
  export PYTHONPATH

and simply install (copy) packages into that directory.

This is conceptually the same as having a $HOME/bin with commands
or your own in it, etc.

If you're getting your packages from pypi, virutalenv may be easier
to use in the long run.  besides, it lets you make multiple
environments for different flavours of Python (2 vs 3, etc).

Cheers,
-- 
Cameron Simpson <cs@zip.com.au>

I just kept it wide-open thinking it would correct itself.
Then I ran out of talent.       - C. Fittipaldi

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: Using virtualenv to bypass sudoer issues Cameron Simpson <cs@zip.com.au> - 2014-02-08 12:18 +1100
  Re: Using virtualenv to bypass sudoer issues Asaf Las <roegltd@gmail.com> - 2014-02-07 19:03 -0800
    Re: Using virtualenv to bypass sudoer issues Cameron Simpson <cs@zip.com.au> - 2014-02-08 14:32 +1100
      Re: Using virtualenv to bypass sudoer issues Asaf Las <roegltd@gmail.com> - 2014-02-07 20:31 -0800

csiph-web