python

xam8gpfp  于 2021-06-25  发布在  Mysql
关注(0)|答案(2)|浏览(363)

这个问题在这里已经有答案了

安装mysql python(windows)(11个答案)
两年前关门了。
我需要在Windows10上安装mysqldb for python,我尝试了下面的方法,但得到了相同的错误:安装脚本退出,错误:命令'cl.exe'失败:没有这样的文件或目录
pip安装mysqlclinet,轻松安装mysql python
请帮帮我!

error: command 'cl.exe' failed: No such file or directory

    E:\Python\Django-PyCharm\DjangoPyCharmWeb>easy_install mysqlclient
Searching for mysqlclient
Reading https://pypi.python.org/simple/mysqlclient/
Downloading https://pypi.python.org/packages/6f/86/bad31f1c1bb0cc99e88ca2adb7cb5c71f7a6540c1bb001480513de76a931/mysqlclient-1.3.1
2.tar.gz#md5=dbf1716e2c01966afec0198d75ce7e69
Best match: mysqlclient 1.3.12
Processing mysqlclient-1.3.12.tar.gz
Writing C:\Users\Hoshmand\AppData\Local\Temp\easy_install-4ln2fjka\mysqlclient-1.3.12\setup.cfg
Running mysqlclient-1.3.12\setup.py -q bdist_egg --dist-dir C:\Users\me\AppData\Local\Temp\easy_install-4ln2fjka\mysqlclien
t-1.3.12\egg-dist-tmp-aeu8iq_w
error: Setup script exited with error: command 'cl.exe' failed: No such file or directory

E:\Python\Django-PyCharm\DjangoPyCharmWeb>

    C:\Users\me\Downloads\mysqlclient-1.3.12>python setup.py build
running build
running build_py
creating build
creating build\lib.win32-3.6
copying _mysql_exceptions.py -> build\lib.win32-3.6
creating build\lib.win32-3.6\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win32-3.6\MySQLdb
copying MySQLdb\compat.py -> build\lib.win32-3.6\MySQLdb
copying MySQLdb\connections.py -> build\lib.win32-3.6\MySQLdb
copying MySQLdb\converters.py -> build\lib.win32-3.6\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win32-3.6\MySQLdb
copying MySQLdb\release.py -> build\lib.win32-3.6\MySQLdb
copying MySQLdb\times.py -> build\lib.win32-3.6\MySQLdb
creating build\lib.win32-3.6\MySQLdb\constants
copying MySQLdb\constants\__init__.py -> build\lib.win32-3.6\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win32-3.6\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win32-3.6\MySQLdb\constants
copying MySQLdb\constants\ER.py -> build\lib.win32-3.6\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-3.6\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win32-3.6\MySQLdb\constants
copying MySQLdb\constants\REFRESH.py -> build\lib.win32-3.6\MySQLdb\constants
running build_ext
building '_mysql' extension
creating build\temp.win32-3.6
creating build\temp.win32-3.6\Release
cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Dversion_info=(1,3,12,'final',0) -D__version__=1.3.12 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.1\include" -IC:\Python\Python36\include -IC:\Python\Python36\include /Tc_mysql.c /Fobuild\temp.win32-3.6\Release\_mysql.obj /Zl
error: command 'cl.exe' failed: No such file or directory
vs3odd8k

vs3odd8k1#

找不到c++库。检查link:https网址:github.com/pygraphviz/pygraphviz/issues/145

ztyzrc3y

ztyzrc3y2#

尝试使用 pip 而不是 easy_install . 这样就可以安装 wheel 而不是从源头建设。

pip install mysqlclient

相关问题