加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

pip 安装过程中依赖处理

发布时间:2020-12-13 22:28:09 所属栏目:百科 来源:网络整理
导读:错误一:pip install M2Crypto 如下错误 copying M2Crypto/SSL/ssl_dispatcher.py - build/lib.linux-x86_64-2.6/M2Crypto/SSL running build_ext building 'M2Crypto.__m2crypto' extension swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c swig -pyth

错误一:pip install M2Crypto 如下错误


 copying M2Crypto/SSL/ssl_dispatcher.py -> build/lib.linux-x86_64-2.6/M2Crypto/SSL
    running build_ext
    building 'M2Crypto.__m2crypto' extension
    swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c
    swig -python -I/usr/include/python2.6 -I/usr/include -I/usr/include/openssl -includeall -modern -D__x86_64__ -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i
    SWIG/_m2crypto.i:30: Error: Unable to find 'openssl/opensslv.h'
    SWIG/_m2crypto.i:33: Error: Unable to find 'openssl/safestack.h'
    SWIG/_evp.i:12: Error: Unable to find 'openssl/opensslconf.h'
    SWIG/_ec.i:7: Error: Unable to find 'openssl/opensslconf.h'
    error: command 'swig' failed with exit status 1
    
    ----------------------------------------
    Command "/usr/bin/python -c "import setuptools,tokenize;__file__='/tmp/pip-build-3lUDcU/M2Crypto/setup.py';exec(compile(getattr(tokenize,'open',open)(__file__).read().replace('rn','n'),__file__,'exec'))" install --record /tmp/pip-eSjJaS-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-3lUDcU/M2Crypto

解决办法如下:

yum install openssl-devel
[root@localhost fuwo_web]# yum install openssl-devel
Loaded plugins: fastestmirror,refresh-packagekit,security
Loading mirror speeds from cached hostfile
 * base: mirrors.skyshe.cn
 * epel: ftp.sjtu.edu.cn
 * extras: mirrors.pubyun.com
 * updates: mirror.bit.edu.cn
Setting up Install Process
Resolving Dependencies
--> Running transaction check


正确结果如下:


.0.3->-r requirements.txt (line 19))
Installing collected packages: M2Crypto,torndb
  Running setup.py install for M2Crypto
  Running setup.py install for torndb
Successfully installed M2Crypto-0.22.3 torndb-0.3

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读