python及相关工具安装Error集 1. 如果升级python版本中出现error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory 解决方法: vim /etc/ld.so.conf 添加:/usr/local/lib 执行:/sbin/ldconfig -v 2. 如果出现unknown url type: https 解决方法: 安装openssl-devel 3. 出现numpy.distutils.system_info.NotFoundError: no lapack/blas resources found 解决办法: 安装atlas atlas-devel.x86_64 4. 出现 Failedto build these modules: binascii zlib 解决办法: 安装zlib并重新编译python 5. 安装numpy报错RuntimeError: Running cythonize failed! 解决办法: 编译安装cython 6. 出现error: library dfftpack has Fortran sources but no Fortran compiler found 解决办法: 安装 gcc-gfortran.x86_64 7. 出现ImportError: No module named bz2: 解决办法: yum install -y bzip2* cd ../Python-2.7.3/Modules/zlib ./configure make make install cd ../../ python setup.py install 重新编译python 8. 出现ImportError: libpython2.7.so.1.0: cannot open shared object file: No such file or directory 解决办法: 编译时只有加上--enable-shared,才会编译这个共享库,默认的位置是python可执行程序所在目录的lib目录下,如/usr/local/python2.7.4
时间: 2024-10-23 15:42:09