python - 无法构建使用 PEP 517 且无法直接安装的密码学轮子

标签 python django python-3.x windows pycharm

C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.24.28314\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD "-IE:\Python Project\PropertyTax\venv\i
nclude" -IC:\Users\pc1\AppData\Local\Programs\Python\Python38\include -IC:\Users\pc1\AppData\Local\Programs\Python\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Bu
ildTools\VC\Tools\MSVC\14.24.28314\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Progra
m Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\
winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tcbuild\temp.win-amd64-3.8\Release\_openssl.c /Fobuild\temp.win-amd64-3.8\Release\build\temp.win-amd64-3.8\R
elease\_openssl.obj
  _openssl.c
  build\temp.win-amd64-3.8\Release\_openssl.c(498): fatal error C1083: Cannot open include file: 'openssl/opensslv.h': No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.24.28314\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

  ----------------------------------------

  Failed building wheel for cryptography
  Running setup.py clean for cryptography`enter code here`
Failed to build cryptography
Could not build wheels for cryptography which use PEP 517 and cannot be installed directly

最佳答案

尝试

python3 -m pip install --upgrade --no-use-pep517 cryptography

这在 Ubuntu:18.04 on armhf 上为我解决了这个问题

其他人建议将 pip setuptools 和 wheel 升级到最新版本:

python3 -m pip install --upgrade pip setuptools wheel

这对我的情况没有帮助,也许对你有帮助

关于python - 无法构建使用 PEP 517 且无法直接安装的密码学轮子,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59746131/

相关文章:

python - 根据 df 中其他两列的比较设置列值

python-3.x - 如何在 python 中使用 ffmpeg 压缩视频?

python - Python 中配置变量的最佳实践

python - isinstance(datetime.datetime, DateTimeField.value) 对于 Django DateTimeField 始终返回 false

python - 如果 Python Pandas 中的列包含任何特殊字符,则重复行

Django动态表单示例

python - 导入 pykml.factory 时出现语法错误

python - 如何查找特定模块的包名称?

python - 密码错误可以访问django中的数据库

django - Dj Rest Auth 自定义注册不起作用