Defaulting to user installation because normal site-packages is not writeable

Python 3:

1
python3 -m pip install [package_name]

Python 2:

1
python -m pip install [package_name]

实战

问题

1
2
pip3 install -i https://pypi.python.org/simple python-telegram-bot==
pip install -i https://pypi.python.org/simple python-telegram-bot==

image-20211102041659816

解决

1
2
python3 -m pip install -i https://pypi.python.org/simple python-telegram-bot==
python -m pip install -i https://pypi.python.org/simple python-telegram-bot==

参考文献

pip/python: normal site-packages is not writeable - Stack Overflow