我在 VS Code 中安装 simplecrypt 时遇到此错误

问题描述 投票:0回答:1
PS E:\ADV-C186-Student> pip install simple-crypt
Defaulting to user installation because normal site-packages is not writeable
Collecting simple-crypt
  Using cached simple_crypt-4.1.7-py3-none-any.whl
Collecting pycrypto (from simple-crypt)
  Using cached pycrypto-2.6.1.tar.gz (446 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: pycrypto
  Building wheel for pycrypto (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [2 lines of output]
      warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
      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/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pycrypto
  Running setup.py clean for pycrypto
Failed to build pycrypto
ERROR: Could not build wheels for pycrypto, which is required to install pyproject.toml-based projects

谁能告诉我一个完美的解决方案

python pip cryptography pypi pycrypto
1个回答
0
投票

该软件包的稳定版本,即 simple-crypt 4.1.7 于 2015 年 6 月 17 日发布。多年未维护的软件包可能会存在兼容性问题,特别是如果您使用的是最新版本的 Python。

也许您可以尝试错误消息所说的内容,看看它是否解决了问题:它说您应该使用“Microsoft C++ Build Tools”获取 Microsoft Visual C++ 14.0 或更高版本:https://visualstudio.microsoft.com/visual- cpp-构建工具/

© www.soinside.com 2019 - 2024. All rights reserved.