Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Dependency management in Python?

Reply
Thread Tools

Dependency management in Python?

 
 
Adelbert Chang
Guest
Posts: n/a
 
      01-11-2013
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 downloadingPython modules I use like NumPy, SciPy, NetworkX, etc because I want to beable to upgrade at any time and doing so seems to be a hassle - in fact, Iam not entirely sure how to "upgrade".

Thank you and regards,
-Adelbert
 
Reply With Quote
 
 
 
 
Rodrick Brown
Guest
Posts: n/a
 
      01-11-2013
On Fri, Jan 11, 2013 at 5:23 PM, Adelbert Chang <(E-Mail Removed)> 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
>


 
Reply With Quote
 
 
 
 
Ian Foote
Guest
Posts: n/a
 
      01-11-2013
On 11/01/13 22:34, Rodrick Brown wrote:
> On Fri, Jan 11, 2013 at 5:23 PM, Adelbert Chang <(E-Mail Removed)
> <(E-Mail Removed)>> 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
 
Reply With Quote
 
Adelbert Chang
Guest
Posts: n/a
 
      01-12-2013
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?
 
Reply With Quote
 
Adelbert Chang
Guest
Posts: n/a
 
      01-12-2013
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?
 
Reply With Quote
 
rh
Guest
Posts: n/a
 
      01-12-2013
On Fri, 11 Jan 2013 18:42:18 -0800 (PST)
Adelbert Chang <(E-Mail Removed)> 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.

 
Reply With Quote
 
Dieter Maurer
Guest
Posts: n/a
 
      01-12-2013
Adelbert Chang <(E-Mail Removed)> 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").

 
Reply With Quote
 
alex23
Guest
Posts: n/a
 
      01-12-2013
On 12 Jan, 17:14, Dieter Maurer <(E-Mail Removed)> wrote:
> Adelbert Chang <(E-Mail Removed)> 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.
 
Reply With Quote
 
Thomas Bach
Guest
Posts: n/a
 
      01-12-2013
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ANN] MagicLoader 0.10.0: painless code dependency management Tony Arcieri Ruby 0 10-26-2010 03:25 PM
Project management / bug management Floris van Haaster ASP .Net 3 09-23-2005 08:36 PM
queue management with "application failure management" pouet Java 2 07-30-2004 09:59 PM
CatOS web management or CiscoView management ? Martin Bilgrav Cisco 1 12-20-2003 01:49 PM



Advertisments