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


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

Dependency management in Python?

Started byAdelbert Chang <adelbertc@gmail.com>
First post2013-01-11 14:23 -0800
Last post2013-01-11 23:38 -0800
Articles 9 — 7 participants

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


Contents

  Dependency management in Python? Adelbert Chang <adelbertc@gmail.com> - 2013-01-11 14:23 -0800
    Re: Dependency management in Python? Rodrick Brown <rodrick.brown@gmail.com> - 2013-01-11 17:34 -0500
    Re: Dependency management in Python? Ian Foote <ian@feete.org> - 2013-01-11 23:04 +0000
      Re: Dependency management in Python? Adelbert Chang <adelbertc@gmail.com> - 2013-01-11 18:42 -0800
        Re: Dependency management in Python? rh <richard_hubbe11@lavabit.com> - 2013-01-11 21:33 -0800
        Re: Dependency management in Python? Thomas Bach <thbach@students.uni-mainz.de> - 2013-01-12 13:43 +0100
      Re: Dependency management in Python? Adelbert Chang <adelbertc@gmail.com> - 2013-01-11 18:42 -0800
    Re: Dependency management in Python? Dieter Maurer <dieter@handshake.de> - 2013-01-12 08:14 +0100
      Re: Dependency management in Python? alex23 <wuwei23@gmail.com> - 2013-01-11 23:38 -0800

#36647 — Dependency management in Python?

FromAdelbert Chang <adelbertc@gmail.com>
Date2013-01-11 14:23 -0800
SubjectDependency management in Python?
Message-ID<6b91570c-9cf0-4caf-8727-b463c6d098cd@googlegroups.com>
Hi all,

I've been using Python for a while now but one of my concerns is if it is possible to have some sort of dependency management (not sure if right term) for Python? 

In the Scala language there is the Simple Build Tool that lets me specify on a project-by-project basis which libraries I want to use (provided they are in a central repository somewhere) and it will download them for me. Better yet, when a new version comes out I need only change the SBT configuration file for that project and it will download it for me.

Is there something like this for Python. I am typically wary of downloading Python modules I use like NumPy, SciPy, NetworkX, etc because I want to be able to upgrade at any time and doing so seems to be a hassle - in fact, I am not entirely sure how to "upgrade".

Thank you and regards,
-Adelbert

[toc] | [next] | [standalone]


#36651

FromRodrick Brown <rodrick.brown@gmail.com>
Date2013-01-11 17:34 -0500
Message-ID<mailman.417.1357943718.2939.python-list@python.org>
In reply to#36647

[Multipart message — attachments visible in raw view] — view raw

On Fri, Jan 11, 2013 at 5:23 PM, Adelbert Chang <adelbertc@gmail.com> wrote:

> Hi all,
>
> I've been using Python for a while now but one of my concerns is if it is
> possible to have some sort of dependency management (not sure if right
> term) for Python?
>
> In the Scala language there is the Simple Build Tool that lets me specify
> on a project-by-project basis which libraries I want to use (provided they
> are in a central repository somewhere) and it will download them for me.
> Better yet, when a new version comes out I need only change the SBT
> configuration file for that project and it will download it for me.
>
> Is there something like this for Python. I am typically wary of
> downloading Python modules I use like NumPy, SciPy, NetworkX, etc because I
> want to be able to upgrade at any time and doing so seems to be a hassle -
> in fact, I am not entirely sure how to "upgrade".
>
>
Checkout PIP/setuptools and virtualenv



> Thank you and regards,
> -Adelbert
> --
> http://mail.python.org/mailman/listinfo/python-list
>

[toc] | [prev] | [next] | [standalone]


#36655

FromIan Foote <ian@feete.org>
Date2013-01-11 23:04 +0000
Message-ID<mailman.420.1357945494.2939.python-list@python.org>
In reply to#36647
On 11/01/13 22:34, Rodrick Brown wrote:
> On Fri, Jan 11, 2013 at 5:23 PM, Adelbert Chang <adelbertc@gmail.com
> <mailto:adelbertc@gmail.com>> wrote:
>
>     Hi all,
>
>     I've been using Python for a while now but one of my concerns is if
>     it is possible to have some sort of dependency management (not sure
>     if right term) for Python?
>
>     In the Scala language there is the Simple Build Tool that lets me
>     specify on a project-by-project basis which libraries I want to use
>     (provided they are in a central repository somewhere) and it will
>     download them for me. Better yet, when a new version comes out I
>     need only change the SBT configuration file for that project and it
>     will download it for me.
>
>     Is there something like this for Python. I am typically wary of
>     downloading Python modules I use like NumPy, SciPy, NetworkX, etc
>     because I want to be able to upgrade at any time and doing so seems
>     to be a hassle - in fact, I am not entirely sure how to "upgrade".
>
>
> Checkout PIP/setuptools and virtualenv
>
>     Thank you and regards,
>     -Adelbert
>     --
>     http://mail.python.org/mailman/listinfo/python-list
>

pip and virtualenv is a great combination. I also like to use 
virtualenvwrapper for convenience, but it isn't necessary.

Ian F

[toc] | [prev] | [next] | [standalone]


#36661

FromAdelbert Chang <adelbertc@gmail.com>
Date2013-01-11 18:42 -0800
Message-ID<69690331-5194-443e-bf6b-fad0c3bf3ff4@googlegroups.com>
In reply to#36655
Perfect, PIP and virtualenv look great.

Another question - how do we then get PIP to the latest version? Or is it relatively easy to uninstall/reinstall PIP?

[toc] | [prev] | [next] | [standalone]


#36674

Fromrh <richard_hubbe11@lavabit.com>
Date2013-01-11 21:33 -0800
Message-ID<mailman.429.1357968729.2939.python-list@python.org>
In reply to#36661
On Fri, 11 Jan 2013 18:42:18 -0800 (PST)
Adelbert Chang <adelbertc@gmail.com> wrote:

> Perfect, PIP and virtualenv look great.

Install virtualenv first. If you're running python 3.3 virtual env is
standard.

> 
> Another question - how do we then get PIP to the latest version? Or
> is it relatively easy to uninstall/reinstall PIP?

You can install pip to the virtualenv and update that pip or
create a new virtualenv and install a new pip.

Lots of possibilities, depends on your workflow.

[toc] | [prev] | [next] | [standalone]


#36699

FromThomas Bach <thbach@students.uni-mainz.de>
Date2013-01-12 13:43 +0100
Message-ID<mailman.444.1357994685.2939.python-list@python.org>
In reply to#36661
On Fri, Jan 11, 2013 at 06:42:18PM -0800, Adelbert Chang wrote:
> Another question - how do we then get PIP to the latest version? Or
> is it relatively easy to uninstall/reinstall PIP?

Simply do a 

$ pip install -U distribute
$ pip install -U pip

from time to time in your virtual environment.

As a side note: some versions of distribute, pip and virtualenv do
interact rather poorly on Python 3. Upgrading via easy_install:

$ easy_install -U distribute
$ easy_install -U pip

usually solves these issues.

Have fun!

     Thomas

[toc] | [prev] | [next] | [standalone]


#36662

FromAdelbert Chang <adelbertc@gmail.com>
Date2013-01-11 18:42 -0800
Message-ID<mailman.423.1357960714.2939.python-list@python.org>
In reply to#36655
Perfect, PIP and virtualenv look great.

Another question - how do we then get PIP to the latest version? Or is it relatively easy to uninstall/reinstall PIP?

[toc] | [prev] | [next] | [standalone]


#36685

FromDieter Maurer <dieter@handshake.de>
Date2013-01-12 08:14 +0100
Message-ID<mailman.436.1357974888.2939.python-list@python.org>
In reply to#36647
Adelbert Chang <adelbertc@gmail.com> writes:

> In the Scala language there is the Simple Build Tool that lets me specify on a project-by-project basis which libraries I want to use (provided they are in a central repository somewhere) and it will download them for me. Better yet, when a new version comes out I need only change the SBT configuration file for that project and it will download it for me.

You might also have a look at "zc.buildout" (--> on "PyPI").

[toc] | [prev] | [next] | [standalone]


#36688

Fromalex23 <wuwei23@gmail.com>
Date2013-01-11 23:38 -0800
Message-ID<b4149878-374e-4310-b96f-9478564b85b2@jl13g2000pbb.googlegroups.com>
In reply to#36685
On 12 Jan, 17:14, Dieter Maurer <die...@handshake.de> wrote:
> Adelbert Chang <adelbe...@gmail.com> writes:
> > In the Scala language there is the Simple Build Tool that lets me specify on a project-by-project basis which libraries I want to use (provided they are in a central repository somewhere) and it will download them for me. Better yet, when a new version comes out I need only change the SBT configuration file for that project and it will download it for me.
>
> You might also have a look at "zc.buildout" (--> on "PyPI").

+1 for zc.buildout

I find virtualenv is great for setting up quick prototyping
environments, while zc.buildout recipes are a much better approach for
group development.

[toc] | [prev] | [standalone]


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


csiph-web