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


Groups > comp.lang.python > #65617

Re: Using virtualenv to bypass sudoer issues

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <cameron@cskk.homeip.net>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'environments': 0.07; 'assuming': 0.09; 'etc).': 0.09; 'skip:$ 20': 0.09; 'subject:virtualenv': 0.09; 'python': 0.11; 'itself.': 0.14; 'from:addr:cs': 0.16; 'from:addr:zip.com.au': 0.16; 'from:name:cameron simpson': 0.16; 'message-id:@cskk.homeip.net': 0.16; 'mkdir': 0.16; 'received:211.29': 0.16; 'received:211.29.132': 0.16; 'received:cskk.homeip.net': 0.16; 'received:homeip.net': 0.16; 'received:optusnet.com.au': 0.16; 'received:syd.optusnet.com.au': 0.16; 'rights,': 0.16; 'simpson': 0.16; 'sudo': 0.16; 'workstation': 0.16; 'wrote:': 0.18; 'skip:p 40': 0.19; 'install': 0.23; 'header:User-Agent:1': 0.23; 'directory.': 0.24; 'lets': 0.24; 'simpler': 0.24; 'cheers,': 0.24; 'environment': 0.24; 'this:': 0.26; 'header:In-Reply-To:1': 0.27; 'correct': 0.29; 'getting': 0.31; 'easier': 0.31; 'to:name :python-list': 0.33; 'received:com.au': 0.36; 'charset:us-ascii': 0.36; 'should': 0.36; 'received:211': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'remove': 0.60; 'commands': 0.60; 'simply': 0.61; "you're": 0.61; 'content- disposition:inline': 0.62; 'different': 0.65; 'kept': 0.65; 'export': 0.74; 'skip:$ 10': 0.81; 'add:': 0.84; 'subject:Using': 0.84; 'besides,': 0.93; 'suited': 0.93
Date Sat, 8 Feb 2014 12:18:02 +1100
From Cameron Simpson <cs@zip.com.au>
To python-list <python-list@python.org>
Subject Re: Using virtualenv to bypass sudoer issues
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
In-Reply-To <1007676733.3292144.1391707932990.JavaMail.root@sequans.com>
User-Agent Mutt/1.5.21 (2010-09-15)
References <1007676733.3292144.1391707932990.JavaMail.root@sequans.com>
X-Optus-CM-Score 0
X-Optus-CM-Analysis v=2.1 cv=HZAtEE08 c=1 sm=1 tr=0 a=YuQlxtEQCowy2cfE5kc7TA==:117 a=YuQlxtEQCowy2cfE5kc7TA==:17 a=ZtCCktOnAAAA:8 a=PO7r1zJSAAAA:8 a=LcaDllckn3IA:10 a=-oFEaGQELvUA:10 a=kj9zAlcOel0A:10 a=vrnE16BAAAAA:8 a=3YYVLidibwwA:10 a=T1oDNNq1AAAA:8 a=kPazLBU6oTcXXXzQLtYA:9 a=CjuIK1q_8ugA:10 a=CahsUZHvwpQA:10
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.6503.1391822294.18130.python-list@python.org> (permalink)
Lines 31
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1391822294 news.xs4all.nl 2901 [2001:888:2000:d::a6]:46405
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:65617

Show key headers only | 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