Linux下安装python的gmpy2库及遇到无法定位软件包的解决办法

gmpy2需要gmp.h &mpfr.h &mpc.h 
安装命令: 
sudo apt-get install libmpfr-dev libmpc-dev 

成功之后再输入安装命令:

pip install gmpy2

 

 

 

若遇到无法定位软件包:

则输入命令:sudo gedit /etc/apt/sources.list

弹出文件,在文件末尾添加:

deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib

若仍无法安装,可尝试其他kali源:

# 163 源
deb http://mirrors.163.com/debian wheezy main non-free contrib
deb-src http://mirrors.163.com/debian wheezy main non-free contrib
deb http://mirrors.163.com/debian wheezy-proposed-updates main non-free contrib
deb-src http://mirrors.163.com/debian wheezy-proposed-updates main non-free contrib
deb-src http://mirrors.163.com/debian-security wheezy/updates main non-free contrib
deb http://mirrors.163.com/debian-security wheezy/updates main non-free contrib

然后  sudo apt-get update  即可

 

posted @ 2018-08-04 13:11  不不不不不好听  阅读(3818)  评论(0编辑  收藏  举报