Can't get mysql-connector to work properly - python

I am trying to connect to a database and for that I am using mysql-connector. The code is correct but I get the following error message:
ERROR: HTTP error 404 while getting https://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-2.1.3.tar.gz
If I use command window and type the following:
pip search mysql-connector
I get the error:
ERROR: XMLRPC request failed [code: -32500]
RuntimeError: PyPI's XMLRPC API is currently disabled due to unmanageable load and will be deprecated in the near future. See https://status.python.org/ for more information.
I have also already installed mysql-connector by using:
pip install mysql-connector-python
Requirement already satisfied: mysql-connector-python in c:\users\pf1vmkh9_adm\appdata\local\programs\python\python39\lib\site-packages (8.0.26)
Requirement already satisfied: protobuf>=3.0.0 in c:\users\pf1vmkh9_adm\appdata\local\programs\python\python39\lib\site-packages (from mysql-connector-python) (3.18.1)
So why do I get that error message?

A note: pip search not working is intended, as the error says - pip list/search was abused and was disabled. You should use PyPI manually to access information on packages - https://pypi.org/project/mysql-connector-python
As to your error... it tries to download mysql-connector-python-2.1.3.tar.gz, while your pip says Requirement already satisfied: mysql-connector-python in c:\users\pf1vmkh9_adm\appdata\local\programs\python\python39\lib\site-packages (8.0.26).
Look at the versions: 2.1.3 vs 8.0.26.
This means you either use wrong python version to run the project or something inside tries to use (and download) some really old code. Which is just no longer hosted at that url, hence you get 404 (not found).

Related

Getting error while running pip3 install smtp

I was trying to operate a toll but when I was listing all the commands so there is a command I.e. pip3 install smtp
and I got an error I.e.
ERROR: Could not find a version that satisfies the requirement smtp (from versions: none)
ERROR: No matching distribution found for smtp
Can anyone tell me the solution?
There isn't a package called smtp in python package index (PyPI). Maybe you meant to use smtpemail, secure-smtplib or smtplibaio? That, or you're missing a dependency.

FlightRadarAPI not found as a module

I am trying to use the FlightRadar24 API as described in this link:
https://pypi.org/project/FlightRadarAPI/#description
I have followed the steps as outlined, however, when trying to run the following simple script, I get an error saying "No Module named 'FlightRadar24':
from FlightRadar.api import FlightRadar24API
fr_api = FlightRadar24API()
However, I re-checked whether the module has been installed, which is true. I installed the module using pip3.
Anyone know how to solve?
When I check if the module has been installed, I get the following:
Requirement already satisfied: flightradar24 in /usr/local/lib/python3.9/site-packages (0.3.1)
Does it have to do with the fact that it is installed in python3.9? How would I get it installed to python 3.7 specifically using pip?

Why is Pipenv failing to found package on pypiserver local repo?

I have a pypiserver running locally with one package already deployed. The server is responding on localhost:8080 and i can see and download the package manually.
But every time I try to install the package through pipenv it can't find it :( Any help would be appreciated ;)
$ pipenv install invault --pypi-mirror http://localhost:8080
Installing invault...
Error: An error occurred while installing invault!
Error text: Looking in indexes: http://localhost:8080, http://localhost:8080/simple
ERROR: Could not find a version that satisfies the requirement invault (from versions: none)
ERROR: No matching distribution found for invault
✘ Installation Failed

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

webkit_server installed but cannot find in script

I have installed webkit-server and dryscrape - but when I run a script I get an error when using a dryscrape function. The error is as follows:
"No such file or directory: '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/webkit_server'"
However, when trying to install webkit_server, I get:
Requirement already satisfied: webkit_server in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (1.0)
To show I already installed it, see link image.
Suggestions from my side are:
There is a difference between webkit_server and webkit-server?
Webkit_server is in the wrong place and can't be found by dryscrape?
I tried to install both using gitclone - same error
Any suggestions would be useful.
List of pip3 installed packages includes webkit-server

Categories

Resources