Linux安装zxing+Python37

1.安装包下载

https://pypi.org/project/zxing/#files(zxing)

https://www.python.org/downloads/release/python-371/(python)

 2.安装python3.7.1

tar xvf Python-3.7.1.tar.xz
cd Python-3.7.1/
./configure
make
make install

出现 No module named '_ctypes'错误提示解决方案:

下载libffi-devel-3.0.13-19.el7.x86_64.rpm

http://mirror.centos.org/centos/7/os/x86_64/Packages/libffi-devel-3.0.13-19.el7.x86_64.rpm

运行安装命令:rpm -ivh libffi-devel-3.0.13-19.el7.x86_64.rpm --nodeps --force

然后重新make和make install,这样基本就OK了,遇到其他问题就度娘吧。

运行python

/home/txh/Python-3.7.1/python

 这样就不会和原系统中安装的python27重复了

3.安装zxing(一般离线模块安装也是如此)

tar -xvf zxing-0.11.tar.gz
cd zxing-0.11/
/home/txh/Python-3.7.1/python setup.py install

 

posted @ 2020-10-21 16:29  南风丶轻语  阅读(661)  评论(0编辑  收藏  举报