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