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


Groups > comp.lang.python > #51687 > unrolled thread

Using system python vs. updated/current version

Started bymemilanuk <memilanuk@gmail.com>
First post2013-07-31 11:35 -0700
Last post2013-08-01 10:44 +1000
Articles 2 — 2 participants

Back to article view | Back to comp.lang.python


Contents

  Using system python vs. updated/current version memilanuk <memilanuk@gmail.com> - 2013-07-31 11:35 -0700
    Re: Using system python vs. updated/current version alex23 <wuwei23@gmail.com> - 2013-08-01 10:44 +1000

#51687 — Using system python vs. updated/current version

Frommemilanuk <memilanuk@gmail.com>
Date2013-07-31 11:35 -0700
SubjectUsing system python vs. updated/current version
Message-ID<mailman.48.1375295768.1251.python-list@python.org>
Hello there,

What would be considered the correct/best way to run a current release
of python locally vs. the installed system version?  On openSUSE 12.3,
the repos currently have 2.7.3 and 3.3.0.  As far as I know, I'm not
really hitting any limitations with the existing versions - my skills
just aren't that far along - so its not a burning 'need' but I'm still
curious/interested in the topic.

Also... in some places in the 'Net I see references to installing
everything 'locally' via pip, etc. in virtualenvs and not touching the
system installed version of python... yet most linux distros seem to
have many/most such packages available in their package repos, which
seems like it'd be easier to install via the package manager and let it
keep things updated.  Could someone touch on what they feel the pros and
cons would be either way?

Thanks,

Monte

[toc] | [next] | [standalone]


#51709

Fromalex23 <wuwei23@gmail.com>
Date2013-08-01 10:44 +1000
Message-ID<ktcakv$fil$1@dont-email.me>
In reply to#51687
On 1/08/2013 4:35 AM, memilanuk wrote:
> Also... in some places in the 'Net I see references to installing
> everything 'locally' via pip, etc. in virtualenvs and not touching the
> system installed version of python... yet most linux distros seem to
> have many/most such packages available in their package repos, which
> seems like it'd be easier to install via the package manager and let it
> keep things updated.  Could someone touch on what they feel the pros and
> cons would be either way?

Generally, if your OS installs a version of Python by default you should 
leave it alone because the OS itself is dependent on it. Updating to 
newer versions of Python or installed libraries can introduce version 
conflict errors in system-level apps, which is a bad thing.

Similarly, using the system install & libraries ties you to those 
versions. This may not be an issue if you're just scripting a few helper 
tools for your system, but it's an unnecessary hinderance if you're 
developing independent applications.

Tools like virtualenv or zc.buildout provide a handy way of sandboxing 
the dependencies of individual applications. They let you build more 
than one app in parallel and not let the dependencies of one interfere 
with the others. Of equal importance is their use in deploying to other 
machines. With virtualenv, you can create a list of installed libraries 
with:

     pip freeze > requirements.txt

To ensure a target machine has all of the dependencies your application 
needs you can then do:

     pin install -r requirements.txt

So: for simple scripts, just go with the system install. For serious 
development work, I highly recommend using virtualenv or zc.buildout to 
contain each development environment.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web