views:

273

answers:

2

I'm using pip and virtualenv for my python application. I would like to upgrade to a new version of the application without touching the dependencies. When I use pip install -U, it tries to upgrade all the packages, and even uninstalls and re-installs the same version of a dependency package when there isn't a new version available. I also tried pip install -U --no-deps but that seems equivalent to a regular install instead of an upgrade. Is there a combination of flags that will do what I want?

A: 

I just tried on my virtualenv project and pip install -U --no-deps mypackage seems to work just fine. It just download mypackage and nothing else. What's your set up like?

Y.H Wong
My confusion came from the difference in behavior when you give pip a specific tarball versus a package name. Carl Meyer had a helpful explanation: http://groups.google.com/group/python-virtualenv/msg/d702c251a6dc40a5
Amy G
A: 

You're right. I thought that when I added --no-deps it had neglected to uninstall the existing version. But I tried it again and see there's no issue.

$ pip install -U --no-deps myproj
Downloading/unpacking myproj
  Downloading myproj-1.0-trunk.31072.tar.gz (43Kb): 43Kb downloaded
  Running setup.py egg_info for package myproj
Installing collected packages: myproj
  Found existing installation: myproj 1.0-trunk.31053
    Uninstalling myproj:
      Successfully uninstalled myproj
  Running setup.py install for myproj
Successfully installed myproj
Cleaning up...
Amy G