Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade won't install newer version #394

Closed
johndoe46 opened this issue Dec 5, 2011 · 9 comments
Closed

upgrade won't install newer version #394

johndoe46 opened this issue Dec 5, 2011 · 9 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@johndoe46
Copy link

I fail to upgrade a package, even though there's a newer version at pypi:

MacBook-Pro-de-Mickael-Desfrenes:~ mickael$ pip search pybean | grep LATEST
LATEST: 0.0.2
MacBook-Pro-de-Mickael-Desfrenes:~ mickael$ pip freeze | grep pybean
pybean==0.0.1
MacBook-Pro-de-Mickael-Desfrenes:~ mickael$ sudo pip install --upgrade pybean
Downloading/unpacking pybean
Running setup.py egg_info for package pybean

Installing collected packages: pybean
Found existing installation: pybean 0.0.1
Uninstalling pybean:
Successfully uninstalled pybean
Running setup.py install for pybean

Successfully installed pybean
Cleaning up...
MacBook-Pro-de-Mickael-Desfrenes:~ mickael$ pip freeze | grep pybean
pybean==0.0.1

@johndoe46
Copy link
Author

I assume there's some kind of cache somewhere since installing on a blank machine I do get version 0.0.2...

@johndoe46
Copy link
Author

I removed /Users/mickael/build/pybean and then re-run the install...

@jezdez
Copy link
Member

jezdez commented Dec 5, 2011

I wasn't able to reproduce this, here's my console log:

[~] $ mkvirtualenv pybean
New python executable in pybean/bin/python
Installing setuptools............done.
Installing pip...............done.
virtualenvwrapper.user_scripts creating /Users/jezdez/.virtualenvs/pybean/bin/predeactivate
virtualenvwrapper.user_scripts creating /Users/jezdez/.virtualenvs/pybean/bin/postdeactivate
virtualenvwrapper.user_scripts creating /Users/jezdez/.virtualenvs/pybean/bin/preactivate
virtualenvwrapper.user_scripts creating /Users/jezdez/.virtualenvs/pybean/bin/postactivate
virtualenvwrapper.user_scripts creating /Users/jezdez/.virtualenvs/pybean/bin/get_env_details
[~] env:pybean $ pip install pybean==0.0.1
Downloading/unpacking pybean==0.0.1
  Downloading pybean-0.0.1.tar.gz
  Running setup.py egg_info for package pybean

Installing collected packages: pybean
  Running setup.py install for pybean

Successfully installed pybean
Cleaning up...
[~] env:pybean $ pip freeze
pybean==0.0.1
wsgiref==0.1.2
[~] env:pybean $ pip install -U pybean
Downloading/unpacking pybean
  Downloading pybean-0.0.2.tar.gz
  Running setup.py egg_info for package pybean

Installing collected packages: pybean
  Found existing installation: pybean 0.0.1
    Uninstalling pybean:
      Successfully uninstalled pybean
  Running setup.py install for pybean

Successfully installed pybean
Cleaning up...
[~] env:pybean $ pip freeze
pybean==0.0.2
wsgiref==0.1.2
[~] env:pybean $

I can only guess, but make sure you don't have an installation of pybean that pip can't uninstall due to permission issues. Using sudo shouldn't also be required if you are in a virtualenv (if that's the case, I'm not sure after looking at your log). Also, please make sure you have the latest version of pip installed (1.0.2 as of writing this).

@jezdez jezdez closed this as completed Dec 5, 2011
@johndoe46
Copy link
Author

I do install some libs system-wide for day-to-day use of some software so virtualenvs is not an option in this case. PIP is the latest version:

MacBook-Pro-de-Mickael-Desfrenes:pybean mickael$ pip --version
pip 1.0.2 from /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg (python 2.7)

This seems to be at least specific to macosx since I can't reproduce this either on a debian box.

@jezdez
Copy link
Member

jezdez commented Dec 5, 2011

Hm, do you happen to be in a directory containing a pybean distribution or code repository? Also, what does running sudo pip freeze give you? The same or a different version of pybean?

@carljm
Copy link
Contributor

carljm commented Dec 5, 2011

There now appears to be a pybean==0.0.3 up on PyPI? And upgrading to it works fine for me.

Most likely reason I can think of for the originally reported issue is that pybean had a 0.0.2 release registered on PyPI, but no actual code uploaded for 0.0.2. Clearly this is no longer the case, but the addition of 0.0.3 indicates the maintainer has made some changes on PyPI since this was reported.

(This is why I don't like "pip search" using the PyPI XML-RPC API. Opened #395 for that issue.)

@johndoe46
Copy link
Author

Hm, do you happen to be in a directory containing a pybean distribution or code repository?

Yes, should it matter ?

but no actual code uploaded for 0.0.2

There was code uploaded.

@carljm
Copy link
Contributor

carljm commented Dec 5, 2011

It's possible that if there is a pybean/ directory in CWD that pip will privilege that over PyPI when you do "pip install pybean". I thought we'd fixed that already, but it's my best remaining idea. If so, that should probably be fixed so pip only privileges the local directory if explicit trailing / is provided. If that is the cause, please update summary/description accordingly and reopen.

If not, please reopen when you're able to provide consistent reproduction instructions. Thanks for the report!

@ysimonson
Copy link

In case anyone else hits this issue googling around, I managed to fix this issue with another package by upgrading to pip 1.4. Previously on 1.3, it would report a success when upgrading a package, but not actually upgrade. After updating pip to 1.4, I got this error message:

pip can't proceed with requirement 'catnap' due to a pre-existing build directory.
 location: /private/tmp/pip-build-root/catnap
This is likely due to a previous installation that failed.
pip is being responsible and not assuming it can delete this.
Please delete it and try again.

So I'm guessing pip 1.3 was silently failing to upgrade due to the same reason.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 6, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

No branches or pull requests

4 participants