简体   繁体   English

因瓶颈错误而导致造轮失败

[英]Failed building wheel for bottleneck error

So I am trying to install bottleneck (by doing pip install bottleneck ) in comand promt and I keep getting the error:所以我试图在 comand promt 中安装bottleneck(通过执行pip install bottleneck installbottleneck ),但我不断收到错误消息:

    ERROR: Command errored out with exit status 1:
   command: 'c:\users\benito\appdata\local\programs\python\python36\python.exe' 'c:\users\benito\appdata\local\programs\python\python36\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\Benito\AppData\Local\Temp\tmp3cb_deoe'
       cwd: C:\Users\Benito\AppData\Local\Temp\pip-install-hrd3bsvr\bottleneck
  Complete output (51 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.6
  creating build\lib.win-amd64-3.6\bottleneck
  copying bottleneck\_pytesttester.py -> build\lib.win-amd64-3.6\bottleneck
  copying bottleneck\_version.py -> build\lib.win-amd64-3.6\bottleneck
  copying bottleneck\__init__.py -> build\lib.win-amd64-3.6\bottleneck
  creating build\lib.win-amd64-3.6\bottleneck\benchmark
  copying bottleneck\benchmark\autotimeit.py -> build\lib.win-amd64-3.6\bottleneck\benchmark
  copying bottleneck\benchmark\bench.py -> build\lib.win-amd64-3.6\bottleneck\benchmark
  copying bottleneck\benchmark\bench_detailed.py -> build\lib.win-amd64-3.6\bottleneck\benchmark
  copying bottleneck\benchmark\__init__.py -> build\lib.win-amd64-3.6\bottleneck\benchmark
  creating build\lib.win-amd64-3.6\bottleneck\slow
  copying bottleneck\slow\move.py -> build\lib.win-amd64-3.6\bottleneck\slow
  copying bottleneck\slow\nonreduce.py -> build\lib.win-amd64-3.6\bottleneck\slow
  copying bottleneck\slow\nonreduce_axis.py -> build\lib.win-amd64-3.6\bottleneck\slow
  copying bottleneck\slow\reduce.py -> build\lib.win-amd64-3.6\bottleneck\slow
  copying bottleneck\slow\__init__.py -> build\lib.win-amd64-3.6\bottleneck\slow
  creating build\lib.win-amd64-3.6\bottleneck\src
  copying bottleneck\src\bn_config.py -> build\lib.win-amd64-3.6\bottleneck\src
  copying bottleneck\src\bn_template.py -> build\lib.win-amd64-3.6\bottleneck\src
  copying bottleneck\src\__init__.py -> build\lib.win-amd64-3.6\bottleneck\src
  creating build\lib.win-amd64-3.6\bottleneck\tests
  copying bottleneck\tests\input_modification_test.py -> build\lib.win-amd64-3.6\bottleneck\tests
  copying bottleneck\tests\list_input_test.py -> build\lib.win-amd64-3.6\bottleneck\tests
  copying bottleneck\tests\memory_test.py -> build\lib.win-amd64-3.6\bottleneck\tests
  copying bottleneck\tests\move_test.py -> build\lib.win-amd64-3.6\bottleneck\tests
  copying bottleneck\tests\nonreduce_axis_test.py -> build\lib.win-amd64-3.6\bottleneck\tests
  copying bottleneck\tests\nonreduce_test.py -> build\lib.win-amd64-3.6\bottleneck\tests
  copying bottleneck\tests\reduce_test.py -> build\lib.win-amd64-3.6\bottleneck\tests
  copying bottleneck\tests\scalar_input_test.py -> build\lib.win-amd64-3.6\bottleneck\tests
  copying bottleneck\tests\util.py -> build\lib.win-amd64-3.6\bottleneck\tests
  copying bottleneck\tests\__init__.py -> build\lib.win-amd64-3.6\bottleneck\tests
  UPDATING build\lib.win-amd64-3.6\bottleneck/_version.py
  set build\lib.win-amd64-3.6\bottleneck/_version.py to '1.3.1'
  running build_ext
  running config
  compiling '_configtest.c':



  int __attribute__((optimize("O3"))) have_attribute_optimize_opt_3(void*);

  int main(void)
  {
      return 0;
  }

  error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
  ----------------------------------------
  ERROR: Failed building wheel for bottleneck
  Running setup.py clean for bottleneck
Failed to build bottleneck
ERROR: Could not build wheels for bottleneck which use PEP 517 and cannot be installed directly

I have also installed Microsoft Visual C++ 14.0, resset my computer and lanuched the program and done the same thing in the program and I am getting the same error.我还安装了 Microsoft Visual C++ 14.0,重置了我的计算机并启动了程序并在程序中做了同样的事情,我得到了同样的错误。 I also have done pip install wheel and then done pip install bottleneck and I recive the same error.我也完成了pip install wheel然后完成了pip install bottleneck installbottleneck 并且我收到了同样的错误。 Also I have python 3.6我也有 python 3.6

I got it to work by installing the bottleneck manually with the respective wheel from this site: www.lfd.uci.edu/~gohlke/pythonlibs/ .我通过使用以下站点的相应轮手动安装瓶颈来使其工作: www.lfd.uci.edu/~gohlke/pythonlibs/

Simply download the file for your Python version (in my case Bottleneck‑1.3.2‑cp38‑cp38‑win_amd64.whl) and install it:只需下载适用于您的 Python 版本的文件(在我的例子中为 Bottleneck‑1.3.2‑cp38‑cp38‑win_amd64.whl)并安装它:

pip install C:\Users\...

All you need to do at first install PyPI then pyinstaller您需要先安装 PyPI 然后安装 pyinstaller

pip install PyPI
pip install pyinstaller

PyPI installation screen capture PyPI 安装屏幕截图

在此处输入图片说明

I also faced the same problem trying to install pycaret on a Windows machine.我在尝试在 Windows 机器上安装 pycaret 时也遇到了同样的问题。 Got the error得到错误

ERROR: Failed building wheel for bottleneck
Failed to build bottleneck
ERROR: Could not build wheels for bottleneck which use PEP 517 and cannot be installed directly

Reading the output it seams that the installation process was unable to install bottleneck, so you have to do that manually.阅读输出结果表明安装过程无法安装瓶颈,因此您必须手动执行此操作。 Pip failed doing that, so because I was using Anaconda env the conda install is the way to go. Pip 没有这样做,所以因为我使用的是 Anaconda env,所以 conda 安装是要走的路。 Also installing p5py and pep517 is a good idea.安装 p5py 和 pep517 也是一个好主意。

I could resolve the problem with the following steps:我可以通过以下步骤解决问题:

  1. conda install bottleneck conda 安装瓶颈
  2. pip install p5py pip 安装 p5py
  3. pip install pep517 pip 安装 pep517
  4. pip install pycaret pip安装pycaret

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM