【发布时间】:2016-04-04 19:01:33
【问题描述】:
我已经尝试了一切,但我不知道从这里去哪里。当我调用命令pip install python-docx 时,我得到了这个:
running build_ext
building 'lxml.etree' extension
error: Unable to find vcvarsall.bat
----------------------------------------
Command "c:\users\alex\appdata\local\programs\python\python35-32\python.exe -c "import setuptools, tokenize;__file__='C:\\Users\\Alex\\AppData\\Local\\Temp\\pip-build-u2i_l872\\lxml\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\Alex\AppData\Local\Temp\pip-26nq6ot7-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Alex\AppData\Local\Temp\pip-build-u2i_l872\lxml
在最后。
我已尝试定位 vsvarsall.bat 并设置路径。我似乎在 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools 中找不到它,并且 C:\Program Files\Microsoft Visual Studio 12.0\Common7 中没有工具文件夹。我在 64 位 Windows 10 和 python 3.5.1 上。
【问题讨论】:
-
如果没记错的话,vcvarsall.bat 在 Visual C++ 2008 中。你安装了吗?
-
还有这个,如果你还没看过的话:stackoverflow.com/questions/27670365/…
标签: python windows batch-file python-docx