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  即可

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM