[Dynamic Language] Python3.7 源码安装 ModuleNotFoundError: No module named '_ctypes' 解决记录
Python3.7 源码安装 ModuleNotFoundError: No module named '_ctypes' 解决记录
源码安装时报错
File "/home/abeenserver/netsource/Python-3.7.0/Lib/ctypes/__init__.py", line 7, in <module>
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
Makefile:1122: recipe for target 'install' failed
make: *** [install] Error 1
解决记录:
- 1 安装依赖包 libffi-dev
abeenserver@abeenserver:~/netsource/Python-3.7.0$ sudo apt-get install libffi-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libffi-dev : Depends: libffi6 (= 3.2.1-4) but 3.2.1-8 is to be installed
E: Unable to correct problems, you have held broken packages.
- 2 看来libffi-dev 依赖的libffi6版本,本地版本有点高了,还是安装后退安装指定依赖包 libffi6=3.2.1-4 吧
abeenserver@abeenserver:~/netsource/Python-3.7.0$ sudo apt-get install libffi6=3.2.1-4
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be DOWNGRADED:
libffi6
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
Need to get 17.8 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://mirrors.ustc.edu.cn/ubuntu xenial/main amd64 libffi6 amd64 3.2.1-4 [17.8 kB]
Fetched 17.8 kB in 2s (9,110 B/s)
dpkg: warning: downgrading libffi6:amd64 from 3.2.1-8 to 3.2.1-4
(Reading database ... 109533 files and directories currently installed.)
Preparing to unpack .../libffi6_3.2.1-4_amd64.deb ...
Unpacking libffi6:amd64 (3.2.1-4) over (3.2.1-8) ...
Setting up libffi6:amd64 (3.2.1-4) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
- 3 再次尝试安装 libffi-dev,成功
abeenserver@abeenserver:~/netsource/Python-3.7.0$ sudo apt-get install libffi-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
libffi-dev
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 161 kB of archives.
After this operation, 365 kB of additional disk space will be used.
Get:1 http://mirrors.ustc.edu.cn/ubuntu xenial/main amd64 libffi-dev amd64 3.2.1-4 [161 kB]
Fetched 161 kB in 0s (434 kB/s)
Selecting previously unselected package libffi-dev:amd64.
(Reading database ... 109533 files and directories currently installed.)
Preparing to unpack .../libffi-dev_3.2.1-4_amd64.deb ...
Unpacking libffi-dev:amd64 (3.2.1-4) ...
Processing triggers for install-info (6.5.0.dfsg.1-2) ...
Setting up libffi-dev:amd64 (3.2.1-4) ...
Processing triggers for man-db (2.8.3-2) ...
- 4 继续配置安装Python3.7,顺利完成!
./configure --enable-shared --enable-loadable-sqlite-extensions --enable-optimizations
make
make test
sudo make install
[Dynamic Language] Python3.7 源码安装 ModuleNotFoundError: No module named '_ctypes' 解决记录的更多相关文章
- Python安装常见问题:ModuleNotFoundError: No module named '_ctypes' 解决办法
一般位于3.7以上版本编译安装时出错 缺少依赖包libffi-devel 在安装3.7以上版本时,需要一个新的libffi-devel包做依赖 解决方法: yum install libffi-dev ...
- centos下安装python3.7.0以上版本时报错ModuleNotFoundError: No module named '_ctypes'
centos下安装python3.7.0以上版本时报错ModuleNotFoundError: No module named '_ctypes'的解决办法 3.7版本需要一个新的包libffi-de ...
- python3.8安装flask出现错误“ModuleNotFoundError: No module named '_ctypes'”
本想在CentOS下配置flask+nginx+uwsgi环境,结果安装最基础的flask包都出了问题...以下是我的环境: 服务器:阿里云ECS CentOS7 python版本:3.8.0 问题描 ...
- redhat 6安装python 3.7.4报错ModuleNotFoundError: No module named '_ctypes' make: *** [install] Error 1
问题描述: 今天在测试环境中,为了执行脚本,安装下python3命令,在执行make install的时候报错: ModuleNotFoundError: No module named '_ctyp ...
- 装新的python3.7时ModuleNotFoundError: No module named '_ctypes'
在编译安装新的python3.7的时候 报错 ModuleNotFoundError: No module named '_ctypes',其实是缺少了一个新需要的开发包libffi-devel,安装 ...
- 报错:ModuleNotFoundError: No module named '_ctypes'
报错背景: CentOS 7 Python3.7 安装 setuptools 插件的时候报错. 报错现象: [root@master setuptools-]# python3. setup.py b ...
- centos7安装python3和Django后,ModuleNotFoundError: No module named '_sqlite3'
1.准备安装环境 yum groupinstall 'Development Tools' yum install zlib-devel bzip2-devel openssl-devel ncurs ...
- CentOS7.5 Python3安装pip报错:ModuleNotFoundError: No module named '_ctypes' --Python3
1.问题:pyhontModuleNotFoundError: No module named '_ctypes' 操作系统:CentOS7.5 安装完Pyhotn3后(如何安装Python3,安装 ...
- python3 使用flask连接数据库出现“ModuleNotFoundError: No module named 'MySQLdb'”
本文链接:https://blog.csdn.net/Granery/article/details/89787348 在使用python3连接MySQL的时候出现了 ‘ModuleNotFoundE ...
随机推荐
- xgboost gbdt特征点分烈点
lightGBM与XGBoost的区别:(来源于:http://baijiahao.baidu.com/s?id=1588002707760744935&wfr=spider&for= ...
- DOS命令基础,包涵DOS库说明书
20种常用的DOS命令小结 作者: 字体:[增加 减小] 类型:转载 DOS命令总共大约有一百个(包括文本编辑.查杀病毒.配置文件.批处理等),我们这里详细介绍二十个常用的DOS命令 先介 ...
- java -D 参数功能解析
我们都知道在启动tomcat或直接执行java命令的时候可以通过参数-XX等来配置虚拟机的大小,同样,也应该留意到java -Dkey=value的参数.那么这个参数是什么作用呢? 使用案例 其实,在 ...
- 大数据统计分析平台之三、Kibana安装和使用
kibana安装 1.到官网下载kibana: cd /usr/local/software wget https://artifacts.elastic.co/downloads/kibana/ki ...
- C#socket编程序(三)
private void ReceiveData() { bool keepalive = true; Socket s = clientSocket; Byte[] buffer = new Byt ...
- drools7 (一、最简单的例子)
切记!!! 必须使用jdk1.8 工程目录 引入依赖包,pom.xml <?xml version="1.0" encoding="UTF-8"?> ...
- Spark(十三)SparkSQL的自定义函数UDF与开窗函数
一 自定义函数UDF 在Spark中,也支持Hive中的自定义函数.自定义函数大致可以分为三种: UDF(User-Defined-Function),即最基本的自定义函数,类似to_char,to_ ...
- 8VC Venture Cup 2016 - Elimination Round F - Group Projects dp好题
F - Group Projects 题目大意:给你n个物品, 每个物品有个权值ai, 把它们分成若干组, 总消耗为每组里的最大值减最小值之和. 问你一共有多少种分组方法. 思路:感觉刚看到的时候的想 ...
- idea 设置svn忽略 .idea内的文件
从ToolView中打开 Version Control -> Local Changes 中的Default ChangesList里面的文件全选中右键选择 Move to Anothe ...
- hdoj1233 还是畅通工程(Prime || Kruskal)
题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=1233 思路 最小生成树问题,使用Prime算法或者Kruskal算法解决. 代码 Prime算法: # ...