我试图安装一些库来在我的python 3.4上使用,但是每次我运行pip install(“name of library”)时,它都返回以下错误:
Collecting pyautogui
Using cached https://files.pythonhosted.org/packages/35/71/a7d328fe19667777fb0c371ca346c89d1b380f7778fa1ba65aca1090478c/PyAutoGUI-0.9.49.tar.gz
Exception:
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\pip\basecommand.py", line 232, in main
status = self.run(options, args)
File "C:\Python34\lib\site-packages\pip\commands\install.py", line 339, in run
requirement_set.prepare_files(finder)
File "C:\Python34\lib\site-packages\pip\req\req_set.py", line 385, in prepare_files
req_to_install.run_egg_info()
File "C:\Python34\lib\site-packages\pip\req\req_install.py", line 310, in run_egg_info
self.setup_py, self.name,
File "C:\Python34\lib\site-packages\pip\req\req_install.py", line 281, in setup_py
import setuptools # noqa
File "C:\Python34\lib\site-packages\setuptools\__init__.py", line 17, in <module>
import setuptools.version
File "C:\Python34\lib\site-packages\setuptools\version.py", line 1, in <module>
import pkg_resources
File "C:\Python34\lib\site-packages\pkg_resources\__init__.py", line 93, in <module>
raise RuntimeError("Python 3.5 or later is required")
RuntimeError: Python 3.5 or later is required
2条答案
按热度按时间e3bfsja21#
您看到这个是因为pip19.2有dropped support for Python 3.4。
好消息:
get-pip.py
脚本已经被updated修改为包含Python 3.4特有的选项,你可以使用下面的命令来请求pip 19.1,这是支持Python 3.4的pip的最新版本:62lalag42#
这里最好的选择是(如果可以的话)升级到受支持的python版本,有关当前受支持的python版本的列表,请参见https://endoflife.date/python