Error trying to install Mysql Client

Asked

Viewed 280 times

0

I’m trying to install mysqlclient on Windows using Pip, so I can use it on Flask, but when I try to use Pip install on CMD (with the files downloaded on the site https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient) message appears:

pip install mysqlclient-1.4.2-cp38-cp38m-win_amd64.whl
WARNING: Requirement 'mysqlclient-1.4.2-cp38-cp38m-win_amd64.whl' looks like a filename, but the file does not exist
ERROR: mysqlclient-1.4.2-cp38-cp38m-win_amd64.whl is not a supported wheel on this platform.

How do I fix it?

1 answer

0


I tested it here on my machine and I had the same problem. In the end, the problem was quite simple, caused only by a difference in character encoding - (hyphen) in the command you entered.

Copy and paste exactly this command below into CMD, in the same folder where you downloaded the file mysqlclient-1.4.2-cp38-cp38m-win_amd64.whl, that will work:

pip install mysqlclient‑1.4.2‑cp38‑cp38m‑win_amd64.whl

OBS - You can give the impression that this command is identical to the one you posted, but it is not. Here the hyphens are already corrected with the correct encoding.

  • Do I have to put the downloaded file in a specific folder? Because I still have the same problem.

  • Hello, sorry for the delay in responding, I just saw it. Yes, you need to run the command on CMD from the same folder where you downloaded the file. The easiest way to do this is to open Windows Explorer (file manager), navigate to the folder where you downloaded the file mysqlclient‑1.4.2‑cp38‑cp38m‑win_amd64.whl, hold the key SHIFT pressed, right-click and choose the option Abrir a janela de comando aqui. Then just run the command of my answer.

  • That was the problem, thank you very much for your help!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.