環境:
現象:
pip3 list /home/user1/.anyenv/envs/pyenv/pyenv.d/exec/pip-rehash/pip: /home/user1/.anyenv/envs/pyenv/versions/3.6.8/bin/pip3: bad interpreter: No such file or directory
解決:
python3 -m pip list python3 -m pip install --upgrade pip pip3 list
/usr/lib/python2.7/site-packages/pkg_resources/py2_warn.py:21: UserWarning: Setuptools will stop working on Python 2 ************************************************************ You are running Setuptools on Python 2, which is no longer supported and >>> SETUPTOOLS WILL STOP WORKING <<< in a subsequent release (no sooner than 2020-04-20). Please ensure you are installing Setuptools using pip 9.x or later or pin to `setuptools<45` in your environment. If you have done those things and are still encountering this message, please follow up at https://bit.ly/setuptools-py2-warning. ************************************************************
sudo pip install setuptools==44.0
aws --version aws-cli/1.16.228 Python/2.7.5 Linux/3.10.0-123.9.3.el7.x86_64 botocore/1.12.218
sudo yum update python ca-certificates curl nss
pytestインストール時に以下のエラーが出た。
zip_safe flag not set; analyzing archive contents... Moving UNKNOWN-4.1.1-py3.5.egg to /home/user01/example/.eggs
pip list Package Version ---------- ------- pip 18.1 setuptools 28.8.0
pip install setuptools --upgrade pip list Package Version ---------- ------- pip 18.1 setuptools 40.6.3
sudo pip3 install smbus2 Collecting smbus2 Downloading https://files.pythonhosted.org/packages/c6/be/6eab4b27693ec2c87f7ff864dfca86c58fbfd1627acbe191dd2f18e0ac3e/smbus2-0.2.1.tar.gz Complete output from command python setup.py egg_info: error in smbus2 setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
sudo pip3 install --upgrade setuptools pip3 list | grep setuptools setuptools 40.5.0