**需要Microsoft Visual C ++ 10.0。使用" Microsoft Windows SDK 7.1":www.microsoft.com/download/details.aspx?id = 8279 **
我在安装mysqlclient或mysql-python时遇到此错误
通过pip install mysqlclient
我已经更新了所有内容而没有使用任何使用崇高文字的视觉工作室产品,请帮助我!
答案 0 :(得分:1)
我想测试一下我在评论中所说的是否属实,所以我尝试在我的 Python 2.7.13中pip install
mysqlclient / em>( VEnv )安装:
e:\Work\Dev\VEnvs\py2713x64-test>Scripts\pip.exe install -v mysqlclient Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect Config variable 'Py_UNICODE_SIZE' is unset, Python ABI tag may be incorrect Collecting mysqlclient 1 location(s) to search for versions of mysqlclient: * https://pypi.python.org/simple/mysqlclient/ Getting page https://pypi.python.org/simple/mysqlclient/ Looking up "https://pypi.python.org/simple/mysqlclient/" in the cache No cache entry available Starting new HTTPS connection (1): pypi.python.org "GET /simple/mysqlclient/ HTTP/1.1" 200 2671 Updating cache with response from "https://pypi.python.org/simple/mysqlclient/" Caching b/c date exists and max-age > 0 Analyzing links from page https://pypi.python.org/simple/mysqlclient/ ... LOTS OF CRAP ... No cache entry available "GET /packages/40/9b/0bc869f290b8f49a99b8d97927f57126a5d1befcf8bac92c60dc855f2523/mysqlclient-1.3.10.tar.gz HTTP/1.1" 200 82102 Downloading mysqlclient-1.3.10.tar.gz (82kB) Downloading from URL https://pypi.python.org/packages/40/9b/0bc869f290b8f49a99b8d97927f57126a5d1befcf8bac92c60dc855f2523/mysqlclient-1.3.10.tar.gz#md5=e7fb95c4055e2d8a3322db5c85ab6fc8 (from https://pypi.python.org/simple/mysqlclient/) 99% |############################### | 81kB 252kB/s eta 0:00:01 Updating cache with response from "https://pypi.python.org/packages/40/9b/0bc869f290b8f49a99b8d97927f57126a5d1befcf8bac92c60dc855f2523/mysqlclient-1.3.10.tar.gz" ... SOME OTHER CRAP ... running build_ext building '_mysql' extension error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27 error Failed building wheel for mysqlclient
发生了什么:
由于此版本仅针对 Python 3.5 和 Python 3.6 ( 32/64位)进行编译:
下载源档案: mysqlclient-1.3.10.tar.gz
唯一不同的是 Microsoft Visual C ++ 10 .0 (或 VStudio 2010 )版本,它告诉我你正在使用 Python 3.3 或(最有可能) Python 3.4 。
可能的解决方案:
pip install mysqlclient
命令)。这是一个时间步骤,当你必须安装其他3个 rd -party模块时,我会100%肯定你需要它附带 C 来源