Dependency management in Python?

Discussion in 'Python' started by Adelbert Chang, Jan 11, 2013.

  1. 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
     
    Adelbert Chang, Jan 11, 2013
    #1
    1. Advertising

  2. On Fri, Jan 11, 2013 at 5:23 PM, Adelbert Chang <> 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
    >
     
    Rodrick Brown, Jan 11, 2013
    #2
    1. Advertising

  3. Adelbert Chang

    Ian Foote Guest

    On 11/01/13 22:34, Rodrick Brown wrote:
    > On Fri, Jan 11, 2013 at 5:23 PM, Adelbert Chang <
    > <mailto:>> 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
     
    Ian Foote, Jan 11, 2013
    #3
  4. 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?
     
    Adelbert Chang, Jan 12, 2013
    #4
  5. 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?
     
    Adelbert Chang, Jan 12, 2013
    #5
  6. Adelbert Chang

    rh Guest

    On Fri, 11 Jan 2013 18:42:18 -0800 (PST)
    Adelbert Chang <> 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.
     
    rh, Jan 12, 2013
    #6
  7. Adelbert Chang <> 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").
     
    Dieter Maurer, Jan 12, 2013
    #7
  8. Adelbert Chang

    alex23 Guest

    On 12 Jan, 17:14, Dieter Maurer <> wrote:
    > Adelbert Chang <> 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.
     
    alex23, Jan 12, 2013
    #8
  9. Adelbert Chang

    Thomas Bach Guest

    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
     
    Thomas Bach, Jan 12, 2013
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Floris van Haaster

    Project management / bug management

    Floris van Haaster, Sep 23, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    1,266
    Jon Paal
    Sep 23, 2005
  2. pouet
    Replies:
    2
    Views:
    806
    Will Hartung
    Jul 30, 2004
  3. Moosebumps
    Replies:
    7
    Views:
    399
    John Roth
    Apr 10, 2004
  4. gnapalm
    Replies:
    0
    Views:
    270
    gnapalm
    Jun 16, 2009
  5. Tony Arcieri
    Replies:
    0
    Views:
    169
    Tony Arcieri
    Oct 26, 2010
Loading...

Share This Page