python3 using the process of resolving failed pip install mysqlclient

First of all, my foundation parser is already a success by pip install mysqlclient installed.
But today created a new Django project, but also create a new virtual environment, when pip install mysqlclient actually failed, the simplest way is I can choose when you create a virtual environment, the direct successor to the foundation parser but so put the foundation parser installed packages all over inherited, which is not appropriate.

Failure of the shots are as follows:
Note:

MySQLdb/_mysql.c(29): fatal error C1083: Cannot open include file: 'mysql.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

Here Insert Picture Description
I was remote connectivity MYSQL, this machine is certainly not install the MYSQL, Microsoft Visual Studio 14.0 has also been installed. The above path is also correct that error I did not get to know.

Installation by downloading whl.

Then choose to download the installation package directly whl it, I also posted about the download site: whl package Download the myselclient
However, the tragedy is still failed. Given as follows: I suggested the installation package is not supported by the current platform, it should be is the wrong version. But my python version is 3.8 and windows10 64 bit is right here. The download whl is mysqlclient-1.4.6-cp38-cp38- win_amd64.whl, the corresponding version is also correct.
Here Insert Picture Description

View pip supported version, modify the file name whl installation package.

Last Seen pip supported versions:

>>> import pip._internal
>>> print(pip._internal.pep425tags.get_supported())
[('cp38', 'cp38m', 'win_amd64'), ('cp38', 'none', 'win_amd64'), ('py3', 'none', 'win_amd64'), ('cp38', 'none', 'any'), ('cp3', 'none', 'any'), ('py38', 'none', 'any'), ('py3', 'none', 'any'), ('py37', 'none', 'any'), ('py36', 'none'
, 'any'), ('py35', 'none', 'any'), ('py34', 'none', 'any'), ('py33', 'none', 'any'), ('py32', 'none', 'any'), ('py31', 'none', 'any'), ('py30', 'none', 'any')]

emm ...
then put
mysqlclient-1.4.6-cp38-cp38- win_amd64.whl
change the name as:
the mysqlclient-1.4.6-CP38-cp38m-win_amd64.whl
before attempting to install, you will be successful:
Here Insert Picture Description

Released seven original articles · won praise 0 · Views 6348

Guess you like

Origin blog.csdn.net/choy_cc/article/details/103985661