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
Related
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
For a project I need to import google-cloud-storage library in python to use speech to text service. While trying to install it via pip, I keep getting the below error:
" Looking in indexes: https://www.artifactrepository.clientdomain.net/artifactory/api/pypi/pypi-dev/simple Collecting google-cloud-storage Could not find a version that satisfies the requirement google-cloud-storage (from versions: ) No matching distribution found for google-cloud-storage"
note that , I have been working inside client domain and the python version I am working with is 3.7.3
I have tried different workarounds available in web and still can't resolve the error. Can anyone please help.
I am trying to install protos using pip install protos but I get following error messages ERROR: Could not find a version that satisfies the requirement protos ERROR: No matching distribution found for protos (these are 2 different lines btw). Does anybody have the same problem because maybe I do not meet the requirements but I the problem is that I don't know which requirements, I just don't find any information. I am using python 3.6.2, pip 20.3.3 and windows 10
The protos package can be found here: https://pypi.org/project/protos/
According to the PyPi page, it requires Python 3.7 or greater. Since you are running Python 3.6 you get the error message when running pip install protos.
If you are looking for Google's protocol buffer, then you should look at pip install protobuf (docs here).
Tried to install unityagents agents using pip install unityagents command but I'm getting this error:
ERROR: No matching distribution found for tensorflow==1.7.1 (from unityagents)
Im using tensorflow version 2.2.1
It looks like the pypi release you're installing is around 2 years old.
The way you're supposed to install the package from the mlagents package instead. See the full instructions.
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