簡體   English   中英

pip在windows中安裝密碼學

[英]Pip install cryptography in windows

運行pip install cryptography時出現以下錯誤:

build\temp.win32-2.7\Release\_openssl.c(434): fatal error C1083: Cannot open include file: 'openssl/opensslv.h': No such file or directory

我正在使用 python 2.7 運行 64 位 Windows 10。 我正在嘗試安裝密碼學 1.9。

安裝 openssl 並更改環境變量為我解決了這個問題。

  • 使用此處的安裝程序安裝 OpenSSL: https ://slproweb.com/products/Win32OpenSSL.html
  • 使用Win32OpenSSL-1_1_0f ,即使您的系統是 64 位(我嘗試安裝 64 位版本的 OpenSSL,但這並沒有解決問題)
  • 現在應該存在以下兩個文件夾: C:\OpenSSL-Win32\include , C:\OpenSSL-Win32\lib
  • 打開 cmd 行終端並運行以下命令:
  • > set INCLUDE=C:\OpenSSL-Win32\include;%INCLUDE%
  • > set LIB=C:\OpenSSL-Win32\lib;%LIB%
  • > pip install cryptography

我在 Fusion 上遇到了同樣的問題,通過升級 pip 解決了這個問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM