无法在Windows 10上使用pip安装Vowpalwabbit [英] Can't install Vowpalwabbit using pip on Windows 10

查看:145
本文介绍了无法在Windows 10上使用pip安装Vowpalwabbit的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 10上安装了python 3.7.0,但无法安装Vowpalwobbit.当我使用命令时:

I have python 3.7.0 installed on Windows 10 and I can't install Vowpalwobbit. When I use command:

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,但仍然无法正常工作.

I tried use Python 3.5.0 and it still didn't work.

推荐答案

我将粘贴我对这个问题的回应在这里:

Python软件包包含需要从源代码构建的C ++,并且由于依赖关系也需要存在而使它变得有点困难.我们正在努力改善Python的安装体验,但与此同时,这是我如何从最新的vw master上使您的情况在Windows 10 1809上正常运行的方法. (自8.5.0以来,情况已经发生了很大变化)

The Python package includes C++ that needs to be built from source, and is made a bit difficult because the dependencies need to be present too. We are working on making the Python install experience better, but in the meantime here is how I was able to get your situation working on Windows 10 1809 from latest vw master. (Things have changed quite a bit since 8.5.0 which is what is on pip)

  • 对于Python3.7,我使用了Boost 1.70(这是vcpkg的最新版本)
  • 我使用了CMake 3.13,它能够解决Boost 1.70的依赖关系

  • For Python3.7 I used Boost 1.70 (This is the latest version on vcpkg)
  • I used CMake 3.13 and it was able to resolve the Boost 1.70 dependencies

  1. 安装vcpkg
  2. 使用vcpkg安装依赖项
  1. Install vcpkg
  2. Install dependencies with vcpkg

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

  1. cd <repo_root>/python
  2. python setup.py --vcpkg-root C:\path\to\vcpkg install
    • C:\path\to\vcpkg是克隆vcpkg的根目录
  1. cd <repo_root>/python
  2. python setup.py --vcpkg-root C:\path\to\vcpkg install
    • Where C:\path\to\vcpkg is the root directory of where you cloned vcpkg

这篇关于无法在Windows 10上使用pip安装Vowpalwabbit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆