我有一个python包由于依赖于Windows构建工具而无法安装。在
我尝试过的事情:> P>安装Visual Studio 2017的最新版本(AFIK它应该包含微软Visual C++ 14)。
将C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools显式地放在我的路径上。
请卸载所有Visual Studio,然后重试。
到目前为止没有运气。我试着重启终端,重启电脑等等。。。我正在使用GitBash,这可能是相关的,尽管它不会给我带来任何问题。在<> P>当我安装工具时,我确保检查“VisualC++的构建工具”工作流,它选择了在单个组件选项卡下可用的多行项目的子集。在
在下面的例子中,我正在安装一个语言模型,但我相信我的问题比这更普遍。我发现很难理解其中哪些组件与我的任务相关。我想知道的是:如何验证我是否正确配置了构建工具,以及是否具有正确的版本?如有任何建议或指导,我们将不胜感激。在
错误:$ pip36 install https://github.com/kpu/kenlm/archive/master.zip
Collecting https://github.com/kpu/kenlm/archive/master.zip
Downloading https://github.com/kpu/kenlm/archive/master.zip (526kB)
Installing collected packages: kenlm
Running setup.py install for kenlm: started
Running setup.py install for kenlm: finished with status 'error'
Complete output from command c:\users\ks99999999\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\ks99999999\\AppData\\Local\\Temp\\pip-tfn5ym94-b uild\\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\ks99999999\AppData\Local\Temp\pip-r2e ogfmd-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building 'kenlm' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http: //landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
Command "c:\users\ks99999999\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptool s, tokenize;__file__='C:\\Users\\ks99999999\\AppData\\Local\\Temp\\pip-tfn5ym94-build\\setup.py';f=getatt r(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __ file__, 'exec'))" install --record C:\Users\ks99999999\AppData\Local\Temp\pip-r2eogfmd-record\install-rec ord.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\ks99999999\Ap pData\Local\Temp\pip-tfn5ym94-build\