Upgrade pip3 offline
python3 -m pip install --upgrade pip-23.0.1-py3-none-any.whl
ModuleNotFoundError: No module named '_bz2'
sudo apt-get install libbz2-dev
cd /usr/local/lib/python3.8/lib-dynload
_gdbm.cpython-38-x86_64-linux-gnu.so
Download link: https://pan.baidu.com/s/1IjjhZARh3VGLhNFNPaE2QQ Extraction code: disj
cd /usr/local/lib/python3.8/
_bz2.cpython-38m-x86_64-linux-gnu.so
Download link: https://pan.baidu.com/s/1wYCStYo9WKGca1pXqq9vsg Extraction code: qgk6
When we use pip to install python packages, the following errors often occur:
ERROR: Could not find a version that satisfies the requirement xxxx(from versions: none)
ERROR: No matching distribution found for xxxx
After searching for a long time, I finally found a way to solve this error.
Directly selecting the pip source and trusting its source can solve this problem.
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
yum -y install gcc automake autoconf libtool make
yum -y install libffi-devel
pip3 install --upgrade setuptools
pip3 install library package name -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
Problem 1: The solution to the error ModuleNotFoundError: No module named '_ctypes' reported during installation
1. Execute the following command:
yum install libffi-devel
apt-get install libffi-devel
2. Reinstall from "./configure --prefix=/usr/local/python3 --with-ssl"
Question 2: pip3 install reports an error "pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available."
Install openssl-dev first, then recompile and install, just add --enable-optimizations during compilation
ubuntu:
sudo apt-get install libffi-dev
or
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
centos7
yum install libffi-devel -y
错误三、Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package lrzsz
sudo apt-get update
sudo add-apt-repository main
sudo add-apt-repository universe
sudo add-apt-repository restricted
sudo add-apt-repository multiverse