美文网首页
【pyhton报错】ModuleNotFoundError: N

【pyhton报错】ModuleNotFoundError: N

作者: 群体遗传学 | 来源:发表于2021-03-10 10:58 被阅读0次

在安装python的模块时,报以上错误,需要安装libffi包。

libffi的安装

wget https://github.com/libffi/libffi/releases/download/v3.3/libffi-3.3.tar.gz
tar zxvf libffi-3.3.tar.gz
cd libffi-3.3
./configure --prefix=`pwd` --enable-shared
make && make install

安装完之后,一定要把libffi的libinclude加到环境变量

Python的重新编译

切记,一定要把libffi生成的include文件夹的头文件*.h都拷贝到python-3.7.9Include文件夹,不然make的时候还是会提示_ctypes安装失败。

make && make install

相关文章

网友评论

      本文标题:【pyhton报错】ModuleNotFoundError: N

      本文链接:https://www.haomeiwen.com/subject/ptcwqltx.html