Reputation: 325
For the numpy,
pip install numpy==?
is not working. It just shows an error message without available package versions.
This happens after I got pip upgraded to 20.3.
Upvotes: 2
Views: 2994
Reputation: 1577
To see available PyPI package versions with pip 20.3, pass --use-deprecated legacy-resolver
.
This issue is recorded at https://github.com/pypa/pip/issues/9139. The current workaround in action:
$ pip wheel --no-deps wheel== --use-deprecated legacy-resolver
ERROR: Could not find a version that satisfies the requirement wheel== (from versions: 0.1, 0.2, 0.3, 0.4, 0.4.1, 0.4.2, 0.5, 0.6, 0.7, 0.8, 0.9, 0.9.1, 0.9.2, 0.9.3, 0.9.4, 0.9.5, 0.9.6, 0.9.7, 0.10.0, 0.10.1, 0.10.2, 0.10.3, 0.11.0, 0.12.0, 0.13.0, 0.14.0, 0.15.0, 0.16.0, 0.17.0, 0.18.0, 0.19.0, 0.21.0, 0.22.0, 0.23.0, 0.24.0, 0.25.0, 0.26.0, 0.27.0, 0.28.0, 0.29.0, 0.30.0a0, 0.30.0, 0.31.0, 0.31.1, 0.32.0, 0.32.1, 0.32.2, 0.32.3, 0.33.0, 0.33.1, 0.33.4, 0.33.5, 0.33.6, 0.34.0, 0.34.1, 0.34.2, 0.35.0, 0.35.1, 0.36.0, 0.36.1)
ERROR: No matching distribution found for wheel==
WARNING: You are using pip version 20.3; however, version 20.3.1 is available.
This workaround will be deprecated in pip 21.
Upvotes: 1
Reputation: 183
ERROR: Could not find a version that satisfies the requirement numpy==?
ERROR: No matching distribution found for numpy==?
I think this is your error and it comes even with earlier versions, with earlier versions of pip and the command "pip install numpy==", it used to return an error and a list of all versions. I am not sure about the command for this in the latest version of pip, but you can visit https://pypi.org/project/numpy/#history to get to know about all the releases
Although there is a way to get to know the installed version of a package using pip show numpy -V
After doing some research, I got this python code that when run, returns the package versions available
Code:
import luddite
print(luddite.get_versions_pypi("numpy")) #Change the string here for your package
You need to first install this package using this command,
pip install luddite
Upvotes: 1
Reputation: 2147
add to your ~/.bashrc
function pipver() { curl -s https://pypi.org/rss/project/$1/releases.xml | sed -n 's/\s*<title>\([0-9.]*\).*/\1/p' ;}
Then open a new terminal window and invoke, using: pipver numpy
substituting whichever module you're looking for version info on.
1.19.4
1.19.3
1.19.2
1.19.1
etc...
It gathers the relevant .rss XML with curl
, then pipes that through sed
the stream-editor, selecting lines that match <title>[version.numbers]
then only printing out those captured version numbers for you.
Upvotes: 4
Reputation: 1
This does not answer the question as you (and I) want it to be answered, but I just looked through the documentation on 20.3 as well as the change log and found zilch. I'm not going to waste any more time on this, so my work around is reverting.
pip install pip==20.2.4
It is not ideal. I can suffer through the warnings that I should upgrade pip until they make that list or a suitable alternative available again.
If you really need the functionality, this will at least let you solve the underlying question about package X (in this case, numpy) until someone in the know comes by.
Upvotes: -1