用常用的命令不行,就只能用sudo python3 setup.py install 安装,然后会报
问题
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None))
或者
ImportError: cannot import name ‘Log’ from ‘distutils.log’ (/home/tianbot/.local/lib/python3.7/site-packages/setuptools/_distutils/log.py)
----------------------------------------
Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-5zkpittb/numpy/
解决:
pip install packageName -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
——————————————————————————————————————————————
问题
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘ProtocolError(‘Connection aborted.’, ConnectionResetError(104, ‘连接被对方重设’))’: /simple/myqr/
解决
pip install 功能包==版本号 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
问题
Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-4d5qwoj9/numpy/
解决
sudo python -m pip install --upgrade --force pip
然后重新下载
问题
ModuleNotFoundError: No module named ‘skbuild’
解决
pip install scikit-build
问题
error: Could not find suitable distribution for Requirement.parse(‘numpy>=1.18’)
解决
pip install 功能包==版本号
调整python环境优先级
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 2
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 150