赞
踩
https://www.python.org/downloads/
https://www.python.org/ftp/python/2.7.14/python-2.7.14.amd64.msi
PATH
添加 Python
的安装路径cmd
命令提示符,输入Python2
,可以正确进入 Python
命令行操作界面,表示安装成功。C:\Python27\Scripts>pip install numpy==1.9.3 Collecting numpy==1.9.3 Cache entry deserialization failed, entry ignored 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 0xd0 in position 7: ordinal not in range(128) You are using pip version 9.0.1, however version 22.0.3 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.
c:\python27\lib\ntpath.py
文件时,result_path = result_path + p_path
语句,进行地址拼接是有中文字符。# 打开c:\python27\lib\ntpath.py,添加下面语句。
import sys
reload(sys)
sys.setdefaultencoding("GBK")
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。