Python3.7安装:ModuleNotFoundError: No module named '_ctypes'

出现的问题

1.zipimport.ZipImportError: can’t decompress data; zlib not available Makefile:1130: recipe for target ‘install’ failed make: *** [install] Error 1
安装zlib1g-dev

sudo apt install zlib1g-dev

2.ModuleNotFoundError: No module named ‘_ctypes’
Makefile:1130: recipe for target ‘install’ failed
make: *** [install] Error 1
方法一:

sudo apt-get install --reinstall zlibc zlib1g zlib1g-dev
sudo apt-get install libffi-dev libssl-dev libreadline-dev -y

方法二:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
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
sudo apt-get install zlib1g-dev libsqlite3-dev tk-dev (已安装至此)
sudo apt-get install libssl-dev openssl
sudo apt-get install libffi-dev
    原文作者:DreamNix
    原文地址: https://www.jianshu.com/p/81e65f237368
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞