无法安装PIP密码学 [英] PIP Cryptography Failing to Install

查看:451
本文介绍了无法安装PIP密码学的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题有很多答案,涉及很多不同的场景,但是我还没有找到解决同一问题的解决方案.当我尝试安装 pip安装密码学时,我得到:

There are a quite a few answers to this question covering a ton of different scenarios but I've yet to find a solution to the self-same issue. When I try to install pip install cryptography I get:

生成cffi模块 'build \ temp.win-amd64-3.8 \ Release \ _padding.c'创建 build \ temp.win-amd64-3.8创建build \ temp.win-amd64-3.8 \ Release
生成cffi模块 生成``build \ temp.win-amd64-3.8 \ Release \ _constant_time.c'' cffi模块'build \ temp.win-amd64-3.8 \ Release \ _openssl.c'
建立'_openssl'扩展名创建 build \ temp.win-amd64-3.8 \ Release \ build创建 build \ temp.win-amd64-3.8 \ Release \ build \ temp.win-amd64-3.8创建 build \ temp.win-amd64-3.8 \ Release \ build \ temp.win-amd64-3.8 \ Release
C:\ Program Files(x86)\ Microsoft Visual Studio \ 2017 \ Professional \ VC \ Tools \ MSVC \ 14.16.27023 \ bin \ HostX86 \ x64 \ cl.exe /c/nologo/Ox/W3/GL/DNDEBUG/MD -IC:\ Users \ be004cr \ PycharmProjects \ SSLTest \ venv \ include -IC:\ Python \ Python38 \ include -IC:\ Python \ Python38 \ include"-IC:\ Program 文件(x86)\ Microsoft Visual Studio \ 2017 \ Professional \ VC \ Tools \ MSVC \ 14.16.27023 \ ATLMFC \ include "-IC:\ Program Files(x86)\ Microsoft Visual Studio \ 2017 \ Professional \ VC \ Tools \ MSVC \ 14.16.27023 \ include" -IC:\ Program 文件(x86)\ Windows Kits \ NETFXSDK \ 4.6.1 \ include \ um" -IC:\ Program 文件(x86)\ Windows Kits \ 10 \ include \ 10.0.17763.0 \ ucrt" -IC:\ Program 文件(x86)\ Windows Kits \ 10 \ include \ 10.0.17763.0 \ shared "-IC:\ Program Files(x86)\ Windows Kits \ 10 \ include \ 10.0.17763.0 \ um" "-IC:\ Program Files(x86)\ Windows Kits \ 10 \ include \ 10.0.17763.0 \ winrt" "-IC:\ Program Files(x86)\ Wind ows 套件\ 10 \包含\ 10.0.17763.0 \ cppwinrt" /Tcbuild\temp.win-amd64-3.8\Release_openssl.c /Fobuild\temp.win-amd64-3.8\Release\build\temp.win-amd64-3.8\Release_openssl.obj _openssl.c build \ temp.win-amd64-3.8 \ Release_openssl.c(498):致命错误C1083:无法打开包含文件:'openssl/opensslv.h':否这样 文件或目录错误:命令'C:\ Program Files(x86)\ Microsoft 视觉的 Studio \ 2017 \ Professional \ VC \ Tools \ MSVC \ 14.16.27023 \ bin \ HostX86 \ x64 \ cl.exe' 失败,退出状态为2

generating cffi module 'build\temp.win-amd64-3.8\Release\_padding.c' creating build\temp.win-amd64-3.8 creating build\temp.win-amd64-3.8\Release
generating cffi module 'build\temp.win-amd64-3.8\Release\_constant_time.c' generating cffi module 'build\temp.win-amd64-3.8\Release\_openssl.c'
building '_openssl' extension creating build\temp.win-amd64-3.8\Release\build creating build\temp.win-amd64-3.8\Release\build\temp.win-amd64-3.8 creating build\temp.win-amd64-3.8\Release\build\temp.win-amd64-3.8\Release
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\be004cr\PycharmProjects\SSLTest\venv\include -IC:\ Python\Python38\include -IC:\Python\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\ 2017\Professional\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86) \Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Wind ows Kits\10\include\10.0.17763.0\cppwinrt" /Tcbuild\temp.win-amd64-3.8\Release_openssl.c /Fobuild\temp.win-amd64-3.8\Release\build\temp.win-amd64-3.8\Release_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\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe' failed with exit status 2

----------------------------------------失败的建筑车轮 加密正在运行setup.py进行加密清除生成失败 密码学无法为使用PEP 517的密码学构建轮子 并且无法直接安装

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

  1. 我正在Windows 10上的PyCharm 2019.2.5中运行虚拟环境.
  2. 我已经从 https://slproweb.com/products/Win32OpenSSL.html,然后选择 最新的32位版本(我初次尝试安装了64位,但在其他地方阅读过,有人对此有问题,因此转换为32位)
  3. 我已将LIB和INCLUDE位置更新为相关的../openssl/include和../openssl/lib位置,并尝试重新运行 pip install ,但我仍然得到相同的消息.我已经在PyCharm和标准CMD提示符下的终端中完成了此操作.
  4. 我正在运行19.0.3版的PIP
  1. I am running a virtual environment within PyCharm 2019.2.5 on a Windows 10.
  2. I have installed OpenSSL from https://slproweb.com/products/Win32OpenSSL.html and selected the latest 32bit version (I had the 64bit installed at first attempt but read elsewhere people had trouble with this so swtiched to 32bit)
  3. I have updated the LIB and INCLUDE locations to the relevant ../openssl/include and ../openssl/lib locations and tried re-running the pip install but I keep gettng the same message. I've done this within the terminal within PyCharm and the standard CMD prompt.
  4. I'm running PIP version 19.0.3

我确定我缺少一些超级简单的东西.只是不知道什么.

I'm sure I'm missing something super simple. Just don't know what.

我正在尝试使用加密技术(本来计划使用pyopenssl,但已经注意到它已被加密技术取代)为我的flask应用程序启用HTTPS.

I'm looking to use the cryptography (originally planned to use pyopenssl but have noticed it's been superceded by cryptography) to enable HTTPS for my flask application.

有什么我想念的吗?我感觉在那里.

Is there anything I've missed? I feel there is.

非常感谢

推荐答案

您可以尝试

1..打开 PyCharm .

2.转到File -> settings -> Project:test(test means your project name) -> select project interpretor -> click add button

3..点击添加按钮并搜索 cryptography然后安装.

3. after clicking add button and search cryptography then install it.

最终运行程序.

这篇关于无法安装PIP密码学的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆