Could not find downloads matching mysql-connector-python requirement

I try to install mysql-connector-python and I get the following error :

 Could not find any downloads that satisfy the requirement mysql-connector-python==2.0.4 (from -r requirements.txt (line 2)) Cleaning up... No distributions at all found for mysql-connector-python==2.0.4 (from -r requirements.txt (line 2)) 

The next steps are:

 virtualenv -p python3 env/ source env/bin/activate pip3 install -r requirements.txt --allow-external mysql-connector-python 

requirements.txt contains the following:

 beautifulsoup4==4.4.1 mysql-connector-python==2.0.4 requests==2.9.1 wheel==0.24.0 

How can this problem be overcome?

+5
source share
2 answers

How to install mysql-connector-python without pip

 git clone git@github.com :mysql/mysql-connector-python.git cd mysql-connector-python python setup.py install 

In fact, you can check how this works with pip freeze or pip list . If you want to install a specific version, you can check the available versions with git tag -n , and then switch to one using, for example, git checkout 2.0.4 , and then run setup.py again.

Background

http://bugs.mysql.com/bug.php?id=79811 .

Seeing that you have the same problem as me, I decided to investigate the problem with Oracle. I noticed that over the past few years they had several tickets for errors, and someone commented on a broken installation yesterday. Unfortunately, these tickets were closed with "no errors", and here we are today, again with broken links.

Update

In response to my big bid, this seems to be the root of the problem:

PyPI decided to no longer allow external advertising projects. I had an email about this a few months ago.

+7
source

Try to change

 mysql-connector-python==2.0.4 

to

 mysql-connector-python-rf==2.1.3 

He worked for Matthew Bernhardt , and he also works for me. I am running Ubuntu 14.04 on Travis CI, and Matthew is running Ubuntu 12.04 on Travis CI.

I'm not sure why. This seems to be a new package managed by another person and also hosted directly on PyPI, which means you can remove --allow-external mysql-connector-python :

 pip3 install -r requirements.txt 
+5
source

Source: https://habr.com/ru/post/1239417/


All Articles