[SciPy-User] Opportunity to contribute: 'pip upgrade'

Neal Becker ndbecker2 at gmail.com
Mon Oct 19 14:18:28 EDT 2015


Nathaniel Smith wrote:

> On Oct 19, 2015 4:58 AM, "Neal Becker" <ndbecker2 at gmail.com> wrote:
>>
>> Nathaniel Smith wrote:
>>
>> > On Sun, Oct 18, 2015 at 11:27 AM, Jouni K. Seppänen <jks at iki.fi> wrote:
>> >> Nathaniel Smith <njs at pobox.com> writes:
>> >>
>> >>> basically the idea would be to add a 'pip upgrade' command that works
>> >>> the way you'd expect (only upgrades the named package, plus whatever
>> >>> other packages are minimally required in order to satisfy its new
>> >>> dependencies -- basically the equivalent of 'pip install foo=<latest
>> >>> version>')
>> >>
>> >> I submitted a patch that attempts to do this:
>> >> https://github.com/pypa/pip/pull/3194
>> >
>> > Awesome!
>> >
>> > -n
>> >
>>
>> Perhaps related,
>> I am running linux/fedora.  My vendor (Fedora) provides may python
> packages,
>> but they aren't always the latest.  I find the most convenient approach
>> is to use:
>> pip install foo --user
>>
>> But in many cases, this won't work correctly.
> 
> Not sure what to say without more details about what these "many cases"
> are. IIUC this should work and if it doesn't then it's a bug (though there
> are adjacent things that aren't expected to work, e.g. 'setup.py install
> --user').
> 

Well I had just installed numpy-1.10.1 and pandas-0.17.0, and here's what 
happens:

$ pip install --user --up pandas
Requirement already up-to-date: pandas in 
/home/nbecker/.local/lib/python2.7/site-packages
Requirement already up-to-date: python-dateutil in 
/home/nbecker/.local/lib/python2.7/site-packages (from pandas)
Requirement already up-to-date: pytz>=2011k in 
/home/nbecker/.local/lib/python2.7/site-packages (from pandas)
Collecting numpy>=1.7.0 (from pandas)
  Using cached numpy-1.10.1.tar.gz
Collecting six>=1.5 (from python-dateutil->pandas)
  Using cached six-1.10.0-py2.py3-none-any.whl
Installing collected packages: numpy, six
  Found existing installation: numpy 1.8.2
    DEPRECATION: Uninstalling a distutils installed project (numpy) has been 
deprecated and will be removed in a future version. This is due to the fact 
that uninstalling a distutils project will only partially uninstall the 
project.
    Uninstalling numpy-1.8.2:
      Successfully uninstalled numpy-1.8.2
  Running setup.py install for numpy
  C-c C-c  Rolling back uninstall of numpy

As you see, it seems to be installing numpy-1.10.1 again, even though it's 
already installed

  /home/nbecker/.local/lib/python2.7/site-packages:
  total used in directory 4264 available 781585920
  drwx------. 1 nbecker nbecker   15272 Oct 19 14:15 .
  drwxrwxr-x. 1 nbecker nbecker     190 Oct 15 10:44 pandas-0.17.0-
py2.7.egg-info
  drwxrwxr-x. 1 nbecker nbecker     506 Oct 15 10:44 pandas
  -rw-rw-r--. 1 nbecker nbecker     869 Oct 15 10:41 easy-install.pth
  -rw-rw-r--. 1 nbecker nbecker    2060 Oct 15 10:37 numpy-1.10.1-py2.7.egg-
info
  drwxrwxr-x. 1 nbecker nbecker     572 Oct 15 10:37 numpy
  drwxrwxr-x. 1 nbecker nbecker     136 Oct 15 10:32 pytz-2015.6.dist-info
  drwxrwxr-x. 1 nbecker nbecker     272 Oct 15 10:32 pytz





More information about the SciPy-User mailing list