python install XXXmodule
阿新 • • 發佈:2018-12-26
First, install pip:
sudo apt install python-pip
Usually the old version was installed.
Then, 'pip install Image'
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-aw5SyO/django/
You are using pip version 8.1.1, however version 9.0.1 is available.You should consider upgrading via the 'pip install --upgrade pip' command.
Solution:
sudo python -m pip install --upgrade --force pip
sudo pip install setuptools==33.1.1
If not completely successful, use 'sudo apt autoremove' as written in the installing history.
Finally:
sudo pip install XXXmodule
dont miss 'sudo'
http://www.zhimengzhe.com/linux/290159.html
後面加了 sudo pip install requests
The directory ‘/home/bzy/.cache/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by ‘ReadTimeoutError(“HTTPSConnectionPool(host=’pypi.python.org’, port=443): Read timed out. (read timeout=15)”,)’: /simple/requests/最後仔細看了下
sudo pip install requests
的報錯資訊
才知道要加上 -H