$ python --version
Python 3.6.15
$ python -m pip install requests
ERROR: Could not find a version that satisfies the requirement requests (from versions: none)
ERROR: No matching distribution found for requests
所以,我检查了PyPI,发现最新的请求版本只支持Python 3.7。
我安装了一个支持Python 3.6的earlier version。
$ pip install requests==2.27.1
ERROR: Could not find a version that satisfies the requirement requests==2.27.1 (from versions: none)
ERROR: No matching distribution found for requests==2.27.1
如何安装Python 3.6的requests库?
似乎我无法安装任何库。
$ python -m ensurepip --upgrade
Looking in links: /tmp/tmpi21sly2x
Requirement already up-to-date: setuptools in /home/dCoder/.pyenv/versions/3.6.15/envs/company_assert/lib/python3.6/site-packages (59.6.0)
Requirement already up-to-date: pip in /home/dCoder/.pyenv/versions/3.6.15/envs/company_assert/lib/python3.6/site-packages (21.3.1)
上面有一个Looking in links: /tmp/tmpi21sly2x
,不知道是什么。
1条答案
按热度按时间tktrz96b1#
重新安装Python后可以工作。不知道问题是什么。