我试图在Python上安装mmh3
(与其他一些lib一起),其他lib安装正常,但是mmh3
出现了一个错误:
ERROR: Complete output from command 'c:\python37\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\evgeniy\\AppData\\Local\\Temp\\pip-install-ppmbqvid\\mmh3\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\evgeniy\AppData\Local\Temp\pip-record-6no3ekq2\install-record.txt' --single-version-externally-managed --compile:
ERROR: running install
running build
running build_ext
building 'mmh3' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command "'c:\python37\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\evgeniy\\AppData\\Local\\Temp\\pip-install-ppmbqvid\\mmh3\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\evgeniy\AppData\Local\Temp\pip-record-6no3ekq2\install-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:\Users\evgeniy\AppData\Local\Temp\pip-install-ppmbqvid\mmh3\
我在第一次得到这个错误之后,我安装了微软VisualC++的构建工具15(V14也安装了),检查了Python是否有它的环境变量并重新启动。在
在重新启动并运行pip install -r requirements.txt
之后,同样的错误再次触发。而且,真的很奇怪:错误文本中引用的路径不存在,两者都存在:
显然,在名为TEMP的文件夹中,没有mmh3
安装或日志或任何相关内容的剩余部分。在
如何安装mmh3
?在
PS:
诀窍是从visualstudio中安装lib(mmh3或其他任何会带来麻烦的东西)。在
来自内部意味着来自其自己的终端/cmd窗口,如Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat)的步骤4所述
相关问题 更多 >
编程相关推荐