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 即可
来源:oschina
链接:https://my.oschina.net/u/4422531/blog/3879707