当前位置:   article > 正文

安装python3.7 报错 ModuleNotFoundError: No module named '_ctypes'的解决办法_python3.7 modulenotfounderror: no module named 'zl

python3.7 modulenotfounderror: no module named 'zlib

Contos   解决:

 一  3.7版本需要一个新的包libffi-devel,安装此包之后再次进行编译安装即可。

  1. #yum install libffi-devel -y
  2. #make install


若在安装前移除了/usr/bin下python的文件链接依赖,此时yum无法正常使用,需要自己下载相关软件包安装,为节省读者时间,放上链接

  1. #wget http://mirror.centos.org/centos/7/os/x86_64/Packages/libffi-devel-3.0.13-18.el7.x86_64.rpm
  2. #rpm -ivh libffi-devel-3.0.13-18.el7.x86_64.rpm


安装完成后重新进行make install,结束后再次配置相关文件的软连接即可。

  1. 建立python3的软链
  2. 1
  3. # ln -s /usr/local/python3/bin/python3 /usr/bin/python3

再不行 就这样子 :

  1. yum -y groupinstall "Development tools"
  2. yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
  3. yum install libffi-devel -y

 

Ubuntu :

  1. sudo apt-get update
  2. sudo apt-get upgrade
  3. sudo apt-get dist-upgrade
  4. sudo apt-get install build-essential python-dev python-setuptools python-pip python-smbus sudo apt-get install build-essential libncursesw5-dev libgdbm-dev libc6-dev
  5. sudo apt-get install zlib1g-dev libsqlite3-dev tk-dev
  6. sudo apt-get install libssl-dev openssl
  7. sudo apt-get install libffi-dev




https://www.jianshu.com/p/d5e8704c9fb7

https://blog.csdn.net/qq_36416904/article/details/79316972

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Gausst松鼠会/article/detail/682603
推荐阅读
相关标签
  

闽ICP备14008679号