Pip: could not find a version. No matching distribution found - python

I'm trying to install Flask-ACL:
https://mikeboers.github.io/Flask-ACL
$ pip search acl | grep -i flask
Flask-ACL (0.0.1) - Access control lists for Flask.
flask-miracle-acl (0.2) - The fabric between the Flask framework and Miracle ACL
Flask-Sandbox (0.1.0)- ACL Route controls for Flask
Flask-SimpleACL (1.2)- Simple ACL extension
$ pip install Flask-ACL
Collecting Flask-ACL
Could not find a version that satisfies the requirement Flask-ACL (from versions: )
No matching distribution found for Flask-ACL
What's wrong here?
P.S. Pip was upgraded a few minutes ago.
UPDATE:
$ python --version
Python 2.7.3
I'm running it under virtualenv.
pip install -Iv Flask-ACL
Collecting Flask-ACL
1 location(s) to search for versions of Flask-ACL:
* https://pypi.python.org/simple/flask-acl/
Getting page https://pypi.python.org/simple/flask-acl/
Looking up "https://pypi.python.org/simple/flask-acl/" in the cache
Current age based on date: 507
Freshness lifetime from max-age: 600
Freshness lifetime from request max-age: 600
The response is "fresh", returning cached response
600 > 507
Analyzing links from page https://pypi.python.org/simple/flask-acl/
Could not find a version that satisfies the requirement Flask-ACL (from versions: )
Cleaning up...
No matching distribution found for Flask-ACL
As I can see, there is no such package on Pypi:
https://pypi.python.org/simple/flask-acl/
but this one exist:
https://pypi.python.org/pypi/Flask-ACL
What is wrong with my pip?

The developers of Flask-ACL made a mistake that they did not manage to upload the Flask-ACL library onto PyPi(where pip searches for modules). so you will have to install it using pip from their GitHub page.
You can do so like this:
pip install "git+https://github.com/mikeboers/Flask-ACL"

A more common reason for this type of error is probably that your environment does not meet the package's requirements.
For example, this occurs if your environment's Python version does not match the required Python version specified by the package:
(my_python36_env)> pip install package_that_requires_python37
ERROR: Could not find a version that satisfies the requirement package_that_requires_python37.
ERROR: No matching distribution found for package_that_requires_python37.

Pay attention if your file ~/.pip/pip.conf not contain any additional index-url values.
Then it can trying to look for specific package version in repository that not exists.
Some workaround solution is to remove pip.conf

I had flask installed in the anaconda but it had some issues when it import it using
from tensorflow.keras.applications.imagenet_utils import preprocess_input, decode_predictions
so instead of the above command, i changed it to
from tensorflow.python.keras.applications.imagenet_utils import preprocess_input, decode_predictions
and it worked fine

Related

How to pip install from a private artifactory?

A private artifactory is available. We pushed a Python lib into it using Twine:
/python-XYZ/mylib/version/mylib-version.tar.gz
However, I do not understand how we can get this library using pip install.
I have tried the following (based on this):
pip install mylib==version --index 'https://myuser:mypassword#XYZ-DOMAIN.fr:443/artifactory/api/pypi/python-XYZ/simple
Which gives this:
ERROR: Could not find a version that satisfies the requirement mylib==version (from versions: none)
ERROR: No matching distribution found for mylib==version
The result is the same with the following endpoints:
/artifactory/api/pypi/python-XYZ/mylib/simple
/artifactory/api/pypi/mylib/simple
/artifactory/api/pypi/python-XYZ/simple
Given the location of my library, how can I pip install it ?
After some digging, here is what it should be in my case.
pip install mylib==version --index-url 'https://USERPWD#XYZ-DOMAIN.fr:443/artifactory/api/pypi/python/simple' --trusted-host=XYZ-DOMAIN.fr

can't find my packages from pycharm/heroku

I have deployed a package into https://pypi.org/project/core-lib/0.0.1.dev1/
But pycharm or heroku can't find my package with this error message
Can you help me, please?
Thank you
Pycharm
No matching package version found: 'core-lib==0.0.1.dev1' (required: ==0.0.1.dev1, installed: <nothing>, latest: <nothing>)
heroku deploy
-----> Installing requirements with pip
ERROR: Could not find a version that satisfies the requirement core-lib==0.0.0.8 (from -r /tmp/build_c6b601b1/requirements.txt (line 1)) (from versions: none)
ERROR: No matching distribution found for core-lib==0.0.0.8 (from -r /tmp/build_c6b601b1/requirements.txt (line 1))
! Push rejected, failed to compile Python app.
! Push failed
Installed your package from pypi using PyCharm, and I am able to find it
(randomtesting) C:\Users\User\PycharmProjects\randomtesting>pip list
Package Version
---------------------- -------------------
core-lib 0.0.1.dev1
Perhaps the file was released into pypi very recently?
And I checked the link again, now it has the latest version.
Maybe try this?
pip install core-lib
You've declared that your package must be used under Python >= 3.7. Please make sure you use Python with high enough version. For example, I tried to install the package with Python 2.7 and pip failed to find the project. With Python 3.7 it was installed successfully.

pip install --process-dependency-links app.whl doesn't install private repo (forked library)

I have a question about distributing an app I created using a .whl (not to pypi). What I'd like to achieve is being able to do pip install --process-dependency-links my_app.whl. As of now the installation goes as expected on a new virtualenv except for what I define inside the dependency_links.
My setup.py looks like this:
setup(
...
install_requires=[
'Click',
'flask',
....,
'vertica-python==0.7.3'
],
dependency_links=[
'https://github.com/lv10/vertica-python/tarball/master/#egg=vertica-python-0.7.3',
],
...
)
I followed different tutorials and consulted several stackoverflow posts: 1, 2 ,3, 4. However, no matter what I try the --process-dependency-links flag doesn't trigger looking up dependency-links instead the installation process results in the installation of vertica-python from pypi.
I run pip install --process-dependency-links app.whl --verbose to see if there was anything special in verbose mode. This is what I get out (confirmation of the obvious):
1 location(s) to search for versions of vertica-python:
* https://pypi.org/simple/vertica-python/
Getting page https://pypi.org/simple/vertica-python/
Looking up "https://pypi.org/simple/vertica-python/" in the cache
Current age based on date: 3376
Freshness lifetime from max-age: 600
Freshness lifetime from request max-age: 600
https://pypi.org:443 "GET /simple/vertica-python/ HTTP/1.1" 304 0
Analyzing links from page https://pypi.org/simple/vertica-python/
Found link https://files.pythonhosted.org/packages/8b/31/12613db5e58d080d532027a1689f89fdd0d1d93aed48e4674fa4683eedea/vertica-python-0.1.tar.gz#sha256=716788811f3775e76adfc4642b133a4027208e37a59fad0f8a07de1877ccdbf6 (from https://pypi.org/simple/vertica-python/), version: 0.1
Found link https://files.pythonhosted.org/packages/33/1b/afbbadcbaa6807268de7df65d97663ee8eded3e3a4b287943dba275588d3/vertica-python-0.1.1.tar.gz#sha256=c2dc17bb8c7c8a15765c69f7295be9c0daa300740f70cb30447094a1c9552da7 (from https://pypi.org/simple/vertica-python/), version: 0.1.1
....
Found link https://files.pythonhosted.org/packages/07/32/d71082d200b865ed2324b4ad4ff9f03af3115485676d2ec1a413573da96b/vertica-python-0.7.2.tar.gz#sha256=28c820ee8fd963d9015d16ee94d847620b1648e30b3f46086d645f2b28057343 (from https://pypi.org/simple/vertica-python/), version: 0.7.2
Found link https://files.pythonhosted.org/packages/60/f6/71c1151a3fc632c55680f01f1fcbb2fc4e8ef4a86d08bb70fa0e4abf9184/vertica-python-0.7.3.tar.gz#sha256=0171a3bacdae06df4b0153d9da8adf2e591adaee818fdcb7555ff0376e4c8e11 (from https://pypi.org/simple/vertica-python/), version: 0.7.3
Found link https://files.pythonhosted.org/packages/de/ff/4471f16ea8b9e2699ee530454d7a042a05494979480a22f1d3cd047981aa/vertica-python-0.7.4.tar.gz#sha256=67b7cf6c684ebf3b152947cc80b1e16743d8454ae5fec052420eef343e7a3617 (from https://pypi.org/simple/vertica-python/), version: 0.7.4
Found link https://files.pythonhosted.org/packages/5a/63/0ddc75273d6437a7163ef69d3ab0670f36616f139fbe06698318b3d40474/vertica_python-0.7.4-py2.py3-none-any.whl#sha256=1869f83717d1a00585a5c6c1d45465757c1438724e4d5c125a8f75f2667b7c83 (from https://pypi.org/simple/vertica-python/), version: 0.7.4
Using version 0.7.3 (newest of versions: 0.7.3)
Using cached wheel link: file:///Users/username/Library/Caches/pip/wheels/fe/fe/ae/570b0448732a2e4cf4f929b797df935379a9e59092e42cc0d7/vertica_python-0.7.3-cp36-none-any.whl
Added vertica-python==0.7.3 from file:///Users/username/Library/Caches/pip/wheels/fe/fe/ae/570b0448732a2e4cf4f929b797df935379a9e59092e42cc0d7/vertica_python-0.7.3-cp36-none-any.whl (from app==0.0.19) to build tracker '/private/var/folders/n9/p_dhgb2s3wg9ypv9nrm8k320n6s9p1/T/pip-req-tracker-eob0khnd'
Removed vertica-python==0.7.3 from file:///Users/username/Library/Caches/pip/wheels/fe/fe/ae/570b0448732a2e4cf4f929b797df935379a9e59092e42cc0d7/vertica_python-0.7.3-cp36-none-any.whl (from app==0.0.19) from build tracker '/private/var/folders/n9/p_dhgb2s3wg9ypv9nrm8k320n6s9p1/T/pip-req-tracker-eob0khnd'
If I use pip install --process-dependency-links app.whl --find-links=https://github.com/lv10/vertica-python/tarball/master/master.tar.gz#egg=vertica-python-0.7.3 then the forked version is installed, which means dependency_links in setup.py is ignored.
Thanks in advance, I would appreciate a push in the right direction.
I suspect that pip is being thrown off by the fact that the dependency link doesn't end in a valid package file extension. Set the URL instead to:
https://github.com/lv10/vertica-python/tarball/master/master.tar.gz#egg=vertica-python-0.7.3

Cannot install python packages thorugh PyPi in Azure Databricks

I want to call a webservice from a Databricks Notebook through Python. The needed library for this seems to be http.client.
I have already found a code snippet to test this but when i try to execute it i get the following error:
ImportError: No module named http.client
This is correct cause i have no module installed yet.
In the next step i go to a folder within my Databricks, select Import -> Import Notebooks dialog click on (To import a library, such as a jar or egg, click here) -> Select in the Language DropDown Upload Python Egg or PyPI -> in pyPI name typehttp.client` and click on Install Library.
Then i select Attach automatically to all clusters.
I receive the following error:
Error: java.lang.RuntimeException: Installation failed with message:
Collecting http.client Collecting http.client Could not find a version
that satisfies the requirement http.client (from versions: ) No
matching distribution found for http.client You are using pip version
9.0.1, however version 18.0 is available. You should consider upgrading via the 'pip install --upgrade pip' command. Could not find
a version that satisfies the requirement http.client (from versions: )
No matching distribution found for http.client You are using pip
version 9.0.1, however version 18.0 is available. You should consider
upgrading via the 'pip install --upgrade pip' command.
How can i fix this?
Can you import httplib, it must resolve the issue

Pip installs old version of package [duplicate]

This question already has answers here:
Why is pip installing an old version of my package?
(15 answers)
Closed 2 years ago.
Pip installs old version of my package
$ pip install pywps
Collecting pywps
Downloading pywps-3.2.6.tar.gz (123kB)
...
If you go to https://pypi.python.org/pypi/pywps/ the version 3.2.6 is not even mentioned there.
It's only mentioned at https://pypi.python.org/simple/pywps/
Any idea, why 3.2.6 is prefered over 4.0.0?
Thanks
P.S. Older responses do not seem to apply to this case.
If you run the command with a verbose option (and an up to date pip), you can see what's happening.
pip install -v pywps
It gives the following output:
1 location(s) to search for versions of pywps:
* https://pypi.python.org/simple/pywps/
...
Skipping link https://pypi.python.org/packages/f9/93/5c2c4c95e53b6193bf239ecc49cb859fd77d181311145edd13ba4cd39e09/pywps-4.0.0-py3.5.egg#md5=338eb2e56a36abc684800961b7e4ee0a (from https://pypi.python.org/simple/pywps/); unsupported archive format: .egg
...
Found link https://pypi.python.org/packages/c8/e6/8b88bc134f714f73e296466ab6b5b5a5ad96c44d35dcbcf41ccf9b76a283/pywps-3.2.6.tar.gz#md5=32bbbefacce633baa9147c74e4416c98 (from https://pypi.python.org/simple/pywps/), version: 3.2.6
Using version 3.2.6 (newest of versions: 3.2.6)
"GET /packages/c8/e6/8b88bc134f714f73e296466ab6b5b5a5ad96c44d35dcbcf41ccf9b76a283/pywps-3.2.6.tar.gz HTTP/1.1" 200 123280
Downloading pywps-3.2.6.tar.gz (123kB)
The egg file is ignored because .egg files are not supported in pip. They were supported by easy_install. I think the best solution is to start producing wheel files, which I think for pywps can be universal. If you also want to keep supporting the easy_install command, you can upload the tar.gz file or keep producing eggs.
You can install version 4.0.0 via pip straight from github:
sudo pip install git+https://github.com/geopython/pywps.git#master#egg=pywps

Categories

Resources