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

Unusual version leads to problems with older pip #1

Closed
nijel opened this issue Jul 18, 2017 · 6 comments
Closed

Unusual version leads to problems with older pip #1

nijel opened this issue Jul 18, 2017 · 6 comments

Comments

@nijel
Copy link

nijel commented Jul 18, 2017

We're using siphashc3 as a dependency in Weblate, when user has old version of pip, the installation fails:

Actual behaviour

pip install -r requirements.txt gives the following error:

Downloading/unpacking siphashc3 (from -r requirements.txt (line 2))
  Could not find a version that satisfies the requirement siphashc3 (from -r requirements.txt (line 2)) (from versions: 3, 2, 1)
Cleaning up...
No distributions matching the version for siphashc3 (from -r requirements.txt (line 2))

Expected behaviour

It should install siphashc3.

I solved this by installing siphashc3 separately and pointing out version 3 explicitly:
pip install siphashc3==3

I guess the solution is to update the requirements.txt to point to version 3 (siphashc3==3 or siphashc3>=3)

Fix

Can you please release siphashc3 with more usual version number so that it doesn't confuse pip?

@carlopires
Copy link
Owner

This module doesn't have any dependency. The problem seems to be on your package.

@nijel
Copy link
Author

nijel commented Jul 18, 2017

Yes, it has been on python 3, see WeblateOrg/weblate#1563 (comment).

@GabLeRoux
Copy link

GabLeRoux commented Jul 19, 2017

I just tried it again on MacOS and it worked:

❯ mkvirtualenv siphashc3-issue -p python3.5
Running virtualenv with interpreter /usr/local/bin/python3.5
Using base prefix '/usr/local/Cellar/python35/3.5.2/Frameworks/Python.framework/Versions/3.5'
New python executable in /Users/gableroux/.virtualenvs/siphashc3-issue/bin/python3.5
Also creating executable in /Users/gableroux/.virtualenvs/siphashc3-issue/bin/python
Installing setuptools, pip, wheel...done.
virtualenvwrapper.user_scripts creating /Users/gableroux/.virtualenvs/siphashc3-issue/bin/predeactivate
virtualenvwrapper.user_scripts creating /Users/gableroux/.virtualenvs/siphashc3-issue/bin/postdeactivate
virtualenvwrapper.user_scripts creating /Users/gableroux/.virtualenvs/siphashc3-issue/bin/preactivate
virtualenvwrapper.user_scripts creating /Users/gableroux/.virtualenvs/siphashc3-issue/bin/postactivate
virtualenvwrapper.user_scripts creating /Users/gableroux/.virtualenvs/siphashc3-issue/bin/get_env_details

❯ pip --version
pip 9.0.1 from /Users/gableroux/.virtualenvs/siphashc3-issue/lib/python3.5/site-packages (python 3.5)

❯ echo "siphashc3" > requirements.txt

❯ pip install -r requirements.txt
Collecting siphashc3 (from -r requirements.txt (line 1))
  Downloading siphashc3-3.tar.gz
Building wheels for collected packages: siphashc3
  Running setup.py bdist_wheel for siphashc3 ... done
  Stored in directory: /Users/gableroux/Library/Caches/pip/wheels/25/8f/f1/99be28d704e00533bfb467afb4ec45202cd4284e2ef498b85a
Successfully built siphashc3
Installing collected packages: siphashc3
Successfully installed siphashc3-3

I just tried again on the server I had the problem and I cannot reproduce anymore. I don't know if you guys did anything, but thanks for your time :) 🎉

@nijel
Copy link
Author

nijel commented Jul 19, 2017

Might be caused by pip using cached version from /Users/gableroux/Library/Caches/pip/wheels, but it's really hard to tell...

@nijel
Copy link
Author

nijel commented Jul 20, 2017

Anyway the problem is in the versioning, here comes log when it goes wrong:

  Getting page https://pypi.python.org/simple/siphashc3/
  URLs to search for versions for siphashc3:
  * https://pypi.python.org/simple/siphashc3/
  Analyzing links from page https://pypi.python.org/simple/siphashc3/
    Found link https://pypi.python.org/packages/2f/7f/0f30b7b8156b5a4e4caed1525c716560e4c500925530f057dec2d614003f/siphashc3-3.tar.gz#md5=b86856858e1f24a7288248f2f45e7c40 (from https://pypi.python.org/simple/siphashc3/), version: 3
    Found link https://pypi.python.org/packages/9f/36/3fbf1b2d28215ff439db8e17f5650eedd93ca0b8637e8ee2020139fd9ba1/siphashc3-2.tar.gz#md5=8a79d696ffc7e86fd9a3ccbdc01d62aa (from https://pypi.python.org/simple/siphashc3/), version: 2
    Found link https://pypi.python.org/packages/d7/a7/205c09ec860b485791d51d79b2fbb4e6e62594f4db5272bb12de75b7383f/siphashc3-1.tar.gz#md5=7ff67fa08a8d19d98acfe07801765f1a (from https://pypi.python.org/simple/siphashc3/), version: 1
  Ignoring link https://pypi.python.org/packages/2f/7f/0f30b7b8156b5a4e4caed1525c716560e4c500925530f057dec2d614003f/siphashc3-3.tar.gz#md5=b86856858e1f24a7288248f2f45e7c40 (from https://pypi.python.org/simple/siphashc3/), version 3 is a pre-release (use --pre to allow).
  Ignoring link https://pypi.python.org/packages/9f/36/3fbf1b2d28215ff439db8e17f5650eedd93ca0b8637e8ee2020139fd9ba1/siphashc3-2.tar.gz#md5=8a79d696ffc7e86fd9a3ccbdc01d62aa (from https://pypi.python.org/simple/siphashc3/), version 2 is a pre-release (use --pre to allow).
  Ignoring link https://pypi.python.org/packages/d7/a7/205c09ec860b485791d51d79b2fbb4e6e62594f4db5272bb12de75b7383f/siphashc3-1.tar.gz#md5=7ff67fa08a8d19d98acfe07801765f1a (from https://pypi.python.org/simple/siphashc3/), version 1 is a pre-release (use --pre to allow).
  Could not find a version that satisfies the requirement siphashc3 (from versions: 3, 2, 1)

So apparently some pip versions think that one digit versions are a pre-release.

@dropwhile
Copy link

dropwhile commented Jul 20, 2017

Seems like the easy fix would be to change the version in setup.py from version=3 to version='3.0'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants