【问题标题】:Jupyter Notebook installation error - Building wheel for argon2-cffi (PEP 517) ... errorJupyter Notebook 安装错误 - argon2-cffi (PEP 517) 的构建轮...错误
【发布时间】:2020-10-07 02:45:13
【问题描述】:
Building wheels for collected packages: argon2-cffi
  Building wheel for argon2-cffi (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\prasa\appdata\local\programs\python\python39\python.exe' 'c:\users\prasa\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\prasa\AppData\Local\Temp\tmpcczeigwt'
       cwd: C:\Users\prasa\AppData\Local\Temp\pip-install-iele2h25\argon2-cffi
  Complete output (17 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.9
  creating build\lib.win-amd64-3.9\argon2
  copying src\argon2\exceptions.py -> build\lib.win-amd64-3.9\argon2
  copying src\argon2\low_level.py -> build\lib.win-amd64-3.9\argon2
  copying src\argon2\_ffi_build.py -> build\lib.win-amd64-3.9\argon2
  copying src\argon2\_legacy.py -> build\lib.win-amd64-3.9\argon2
  copying src\argon2\_password_hasher.py -> build\lib.win-amd64-3.9\argon2
  copying src\argon2\_utils.py -> build\lib.win-amd64-3.9\argon2
  copying src\argon2\__init__.py -> build\lib.win-amd64-3.9\argon2
  copying src\argon2\__main__.py -> build\lib.win-amd64-3.9\argon2
  running build_clib
  building 'argon2' library
  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  ----------------------------------------
  ERROR: Failed building wheel for argon2-cffi
Failed to build argon2-cffi
ERROR: Could not build wheels for argon2-cffi which use PEP 517 and cannot be installed directly

我在我的电脑上安装了 python 3.9。当我尝试安装 jupyter notebook 时出现此错误。那么如何解决这个问题呢?

【问题讨论】:

标签: python jupyter


【解决方案1】:

我遇到了和你一样的问题。我就是这样解决的。

我在这里找到了答案:https://discuss.codecademy.com/t/having-trouble-installing-jupyter-notebooks/537292/2

如果您愿意,可以使用该链接并按照说明进行操作。我也会在这里告诉你怎么做。

这很容易解决。该错误是关于 Microsoft Visual C++ 已过时。在错误中,它会为您提供更新链接。

error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

转到https://visualstudio.microsoft.com/visual-cpp-build-tools/ 并单击“下载构建工具”并安装它。

安装后,您会看到一些选择。选择“C++ 构建工具”并安装它。完成后重新启动计算机。然后运行pip install jupyter,你应该会很好!

【讨论】:

  • 1.11GB 下载大小;空间 4.4GB
【解决方案2】:

如果是 Intel CPU 上的 mac 用户,只需检查您的 pip 版本,如果您通过命令安装:

pip install notebook

升级你的 PIP,对我有用的命令:

/Library/Developer/CommandLineTools/usr/bin/python3 -m pip install --upgrade pip

使用命令检查它是否是最新版本的 PIP :

pip --version

在此之后,再试一次:

pip install notebook

这一次您应该不会看到任何错误。

然后在路径变量中包含 ~/Library/Python/3.8/bin。 检查它是否在那里:

echo $PATH

然后通过命令启动 jupyter notebook :

jupyter notebook

【讨论】:

  • 令人惊讶的是,这对我有用。我从系统 pip3 版本的 20.x 转到 21.3.1,并且轮子安装得很好。
  • @blahblahetcetc:如果您觉得它有用,请点赞答案,谢谢:)
【解决方案3】:

如果其他人有问题并且在他们的情况下会起作用。

就我而言,我使用的是:

py -3.8 -m pip install pyautogui

这给了我回应:

Python 3.8 not found!
Installed Pythons found by C:\Windows\py.exe Launcher for Windows
 -3.9-64 *
 -3.7-64

所以在我安装 Python 3.8 后再次使用:

py -3.8 -m pip install pyautogui

结果:

Successfully installed PyTweening-1.0.3 mouseinfo-0.1.3 pyautogui-0.9.52 pygetwindow-0.0.9 pymsgbox-1.0.9 pyperclip-1.8.1 pyrect-0.1.4 pyscreeze-0.

【讨论】:

  • 3.7本身可以安装
【解决方案4】:

由于报错提示需要下载Microsoft Visual C++ 14.0 or greater

【讨论】:

  • 后来我下载了。但它并不能修复错误。
  • @PrasadM96 并安装?
【解决方案5】:

P.S. The wheel 现已添加

Microsoft Visual C++ 14.2 独立版:Visual Studio 2019 构建工具(x86、x64、ARM、ARM64)

这是 Visual C++ 14.2 编译器的独立版本,您无需安装 Visual Studio 2019。

Build Tools 还允许我们安装任何以前的 Visual C++ 14 版本(包括 2015、2017 版本)。

Source

1.11 GB 下载大小;空间 4.4 GB

【讨论】:

    【解决方案6】:

    argon2-cffi 现在为 Windows 提供 Python 3.9 轮子,应该可以解决您的安装问题。

    【讨论】:

    • 我在 Windows 上运行 py 3.9.1,安装 pip 依赖项时仍然出现此错误
    • 你的pip --version 是什么?你在 ARM 上吗?
    • 我不记得了。我继续讨论这个问题。它是 windows 上的 python 3.9.1。
    【解决方案7】:

    我在调用 python 3.7.5 时遇到了这个问题

    pip install jupyter
    

    解决办法是先调用

    pip install argon2-cffi==20.1.0 
    

    然后调用

      pip install jupyter
    

    我认为该错误出现在最新版本的 argon2-cffi 中。这是 21.1.0 https://pypi.org/project/argon2-cffi/21.1.0/#history

    【讨论】:

      猜你喜欢
      • 2020-11-09
      • 2021-06-22
      • 2020-11-01
      • 2021-04-14
      • 2020-08-05
      • 2021-02-28
      • 2020-10-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多