pip 安装过程中依赖处理

错误一: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('\r\n', '\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



转载于:https://www.cnblogs.com/peerlessmeng/p/4482972.html

你可能感兴趣的:(pip 安装过程中依赖处理)