Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pip install producing "Could not find a version that satisfies the requirement" [duplicate]

I have a package that i have uploaded to test.pypi.

I can install this package in a virtual environment on my machine without any issues using

pip install --index-url https://test.pypi.org/simple/ package_name_here

There is a list of requirements for the package in a 'requirements.txt' file, which are also included in 'install_requires' in the config dict fed to setup in setup.py.

This works fine on my machine. When I try the same process within a clean virtual environment on one of my groups local servers i get the following error:

  Could not find a version that satisfies the requirement widgetsnbextension>=3.2.1 (from package_name_here) (from versions: )
No matching distribution found for widgetsnbextension>=3.2.1 (from package_name_here)

for many of the requirements in the requirements.txt file.

However when the install bails, if i do:

pip install widgetsnbextension

pip finds and installs widgetsnbextension-3.2.1 without any problem.

The requirements.txt file was made by using pip freeze, so I am confused as to why it will work without the version number, but not with it.

Can anyone explain what I am doing wrong please?

like image 288
abinitio Avatar asked Jul 30 '18 08:07

abinitio


1 Answers

If you use --index-url pip will no longer install from "proper PyPI", but only from "test PyPI". If instead you use --extra-index-url, it will install from both:

pip install --extra-index-url https://test.pypi.org/simple/ package_name_here
like image 170
Nils Werner Avatar answered Oct 03 '22 00:10

Nils Werner