不能在WY10X64上安装Python 3.7.1的MMH3,VisualC++的构建工具没有被识别

2024-09-29 23:21:26 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图在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之后,同样的错误再次触发。而且,真的很奇怪:错误文本中引用的路径不存在,两者都存在:

  • 不是C:\Users\evgeniy\AppData\Local\Temp\pip-record-6no3ekq2\install-记录.txt在
  • 不是C:\Users\evgeniy\AppData\Local\Temp\pip install ppmbqvid\mmh3\

显然,在名为TEMP的文件夹中,没有mmh3安装或日志或任何相关内容的剩余部分。在

如何安装mmh3?在

PS


Tags: installpiplocal错误codeopenrecordusers

热门问题