[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 ...
随机推荐
- No.11 selenium学习之路之加载浏览器插件for Firefox
打开帮助 —— 故障排除信息
- TDictionary 与 TObjectDictionary
TDictionary 与 TObjectDictionary 的区别是 : TObjectDictionary 可以做到 free的时候 里面的对象 一并free,从而不会出现内存 泄露. 用途: ...
- MySQL执行计划explain的key_len解析
前言:当用Explain查看SQL的执行计划时,里面有列显示了 key_len 的值,根据这个值可以判断索引的长度,在组合索引里面可以更清楚的了解到了哪部分字段使用到了索引.下面演示中,表结构的合理性 ...
- sqlserver导出为EXcel--CSV格式
DataTable dt = Connect.BindTable(" SELECT 名称,地址,当前日期 FROM table GROUP BY 名称,地址,当前日期 order ...
- Java中使用google.zxing快捷生成二维码(附工具类源码)
移动互联网时代,基于手机端的各种活动扫码和收付款码层出不穷:那我们如何在Java中生成自己想要的二维码呢?下面就来讲讲在Java开发中使用 google.zxing 生成二维码. 一般情况下,Java ...
- 出现丢包解决方法(ping: sendmsg: Operation not permitted)
故障排查: 早上突然收到nagios服务器check_icmp的报警,报警显示一台网站服务器的内网网络有问题.因为那台服务器挂载了内网的NFS,因此内网的网络就采用nagios的check_icmp来 ...
- linux ncat命令
netcat是网络工具中的瑞士军刀,它能通过TCP和UDP在网络中读写数据.通过与其他工具结合和重定向,你可以在脚本中以多种方式使用它.使用netcat命令所能完成的事情令人惊讶. netcat所做的 ...
- markdown转换为html
想要自己实现markdown编辑器,欲使用markdown-it作为编辑器,有着比较多的插件,可以实现代码高亮以及对数学公式转换等功能. // Activate/deactivate rules, w ...
- Educational Codeforces Round 45 (Rated for Div. 2) G - GCD Counting
G - GCD Counting 思路:我猜测了一下gcd的个数不会很多,然后我就用dfs回溯的时候用map暴力合并就好啦. 终判被卡了MLE..... 需要每次清空一下子树的map... #inc ...
- 重装Win7后找回Ubuntu启动项并在Ubuntu中修复引导
1. 输入$ sudo fdisk -l 查看磁盘信息,选择Linux的磁盘,如sda10 2. 输入$ sudo -i(此步用于得到root权限,方便以下操作.) 3. 输入$ mkdir /med ...