Using virtualenv to bypass sudoer issues
Cameron Simpson
cs at zip.com.au
Fri Feb 7 20:18:02 EST 2014
On 06Feb2014 18:32, Jean-Michel Pichavant <jeanmichel at 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 at zip.com.au>
I just kept it wide-open thinking it would correct itself.
Then I ran out of talent. - C. Fittipaldi
More information about the Python-list
mailing list