我在 Windows 10 上安装了 python 3.7.0,但无法安装 Vowpalwobbit。当我使用命令时:
pip install vowpalwabbit
我得到:
Building wheels for collected packages: vowpalwabbit
Building wheel for vowpalwabbit (setup.py) ... error
ERROR: Complete output from command 'c:\users\user\appdata\local\programs\python\python37-32\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-0tp3npd1\\vowpalwabbit\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\User\AppData\Local\Temp\pip-wheel-78e8xolx' --python-tag cp37:
ERROR: running bdist_wheel
...
File "C:\Users\User\AppData\Local\Temp\pip-install-0tp3npd1\vowpalwabbit\setup.py", line 115, in build_extension
raise Exception('Pre-built vw/python library for Windows is not supported for this python version')
Exception: Pre-built vw/python library for Windows is not supported for this python version
我尝试使用Python 3.5.0,但仍然不起作用。
最佳答案
我将粘贴 response I gave on the issue这里:
Python 包包含需要从源代码构建的 C++,并且由于依赖项也需要存在而变得有 pip 困难。我们正在努力让 Python 安装体验变得更好,但与此同时,我还介绍了如何让您的情况在最新的 vw master 上运行在 Windows 10 1809 上。 (自 8.5.0 以来,情况发生了很大变化,这就是 pip 上的内容)
- 对于Python3.7,我使用Boost 1.70(这是vcpkg上的最新版本)
我使用了 CMake 3.13,它能够解决 Boost 1.70 依赖项
vcpkg install zlib:x64-windows vcpkg install boost-system:x64-windows vcpkg install boost-program-options:x64-windows vcpkg install boost-test:x64-windows vcpkg install boost-align:x64-windows vcpkg install boost-foreach:x64-windows vcpkg install boost-python:x64-windows vcpkg install boost-math:x64-windows vcpkg install boost-thread:x64-windows
-
cd <repo_root>/python
-
python setup.py --vcpkg-root C:\path\to\vcpkg install
- 哪里
C:\path\to\vcpkg
是您克隆 vcpkg 的根目录
- 哪里
-
关于python - 无法在 Windows 10 上使用 pip 安装 Vowpalwabbit,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56306861/