久久r热视频,国产午夜精品一区二区三区视频,亚洲精品自拍偷拍,欧美日韩精品二区

您的位置:首頁(yè)技術(shù)文章
文章詳情頁(yè)

解決Python安裝cryptography報(bào)錯(cuò)問(wèn)題

瀏覽:44日期:2022-07-12 13:44:24

錯(cuò)誤一:

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python2.7 -c c/_cffi_backend.c -o build/temp.linux-x86_64-2.7/c/_cffi_backend.o

c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory

compilation terminated.

error: command ’gcc’ failed with exit status 1

原因:

缺少頭文件和靜態(tài)庫(kù)包

解決方法:

sudo apt-get install libffi-dev

錯(cuò)誤二:

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/_openssl.c -o build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/_openssl.o -Wconversion -Wno-error=sign-conversion

build/temp.linux-x86_64-2.7/_openssl.c:28:20: fatal error: Python.h: No such file or directory

compilation terminated.

error: command ’gcc’ failed with exit status 1

原因:

缺少Python的頭文件和靜態(tài)庫(kù)包

解決方法:

sudo apt-get install python-dev

補(bǔ)充知識(shí):windows 中 pip 安裝庫(kù)時(shí)出現(xiàn) cryptography 報(bào)錯(cuò) 解決方案

如果在安裝程序中,系統(tǒng)提示有cryptography 的報(bào)錯(cuò),并提示有類似C:UsersAdministratorAppDataRoamingpip

這種路徑提示信息,那么是你的 pip 源出現(xiàn)了問(wèn)題。

首先,打開(kāi)該路徑文件。一般這種文件的類型是隱藏文件,在win10的頁(yè)面工具欄中有相應(yīng)的顯示文件的選項(xiàng),

而在win7中在工具——文件夾選項(xiàng)中。之后輸入你的 pip 路徑例如:C:UsersAdministratorAppDataRoamingpip

最后,打開(kāi) pip.ini 文件 在里面寫入

[global]

timeout = 6000

index-url = https://pypi.mirrors.ustc.edu.cn/simple

trusted-host = pip.mirrors.ustc.edu.cn

不行的話,試試更新pip,在執(zhí)行上面步驟。

以上這篇解決Python安裝cryptography報(bào)錯(cuò)問(wèn)題就是小編分享給大家的全部?jī)?nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持好吧啦網(wǎng)。

標(biāo)簽: Python 編程
相關(guān)文章:
主站蜘蛛池模板: 屏东县| 策勒县| 前郭尔| 怀集县| 洪洞县| 高陵县| 德江县| 和龙市| 连城县| 建宁县| 大城县| 三明市| 阜宁县| 尉氏县| 青龙| 米脂县| 诸暨市| 大安市| 班玛县| 巢湖市| 陇川县| 郁南县| 通江县| 美姑县| 宣恩县| 石景山区| 凤阳县| 台湾省| 宁阳县| 介休市| 聊城市| 双桥区| 永胜县| 侯马市| 健康| 柯坪县| 祁门县| 固安县| 玉屏| 绥宁县| 休宁县|