【发布时间】:2021-11-15 19:49:40
【问题描述】:
我输入的命令:pip install ipython
输出:
*Exception:
Traceback (most recent call last):
File "c:\python27\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "c:\python27\lib\site-packages\pip\commands\install.py", line 324, in run
requirement_set.prepare_files(finder)
File "c:\python27\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "c:\python27\lib\site-packages\pip\req\req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "c:\python27\lib\site-packages\pip\download.py", line 821, in unpack_url
hashes=hashes
File "c:\python27\lib\site-packages\pip\download.py", line 659, in unpack_http_url
hashes)
File "c:\python27\lib\site-packages\pip\download.py", line 880, in _download_http_url
file_path = os.path.join(temp_dir, filename)
File "c:\python27\lib\ntpath.py", line 85, in join
result_path = result_path + p_path
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 7: ordinal not in range(128)
You are using pip version 9.0.3, however version 21.2.4 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.*
我尝试了它提供的命令:python -m pip install --upgrade pip
它什么也没显示。之后,我再次尝试“pip install ipython”,弹出同样的错误。
【问题讨论】:
-
Python2 的最后一个 pip 版本是 20.3。 pip.pypa.io/en/latest/development/release-process/…
-
你真的应该迁移到 python3
-
你也安装了python3吗?
-
因为现有的程序是在python2.7上开发的,所以我要在这个版本上继续。
标签: python python-2.7 pip