windows 安装计算机模块时出现“Microsoft Visual C++ 14.0或更高版本”错误

vd8tlhqk  于 2023-10-22  发布在  Windows
关注(0)|答案(1)|浏览(172)
PS C:\Users\janri\OneDrive\Documents\Visual Studio Code Project\Smart Locker System Pico> pip install machine
Collecting machine
  Downloading machine-0.0.1-py2.py3-none-any.whl (4.2 kB)
Collecting pycrypto (from machine)
  Downloading pycrypto-2.6.1.tar.gz (446 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 446.2/446.2 kB 5.5 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pycrypto
  Building wheel for pycrypto (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for pycrypto (pyproject.toml) 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
Failed to build pycrypto
ERROR: Could not build wheels for pycrypto, which is required to install pyproject.toml-based projects

如何解决这个错误?我想用Visual Studio Code编程Raspberry Pi皮科W并安装Micro皮科扩展。

8i9zcol2

8i9zcol21#

问题是无法安装PyCrypto相关软件包。此模块不提供Windows版本。

相关问题