我在python2.7
上安装了点子。当我输入'pip'时出现了一些错误。谁能告诉我为什么?非常感谢!
这是错误:
C:\Users\ckf>pip
Traceback (most recent call last):
File "C:\Python27\Scripts\pip-script.py", line 9, in <module>
load_entry_point('pip==8.1.1', 'console_scripts', 'pip')()
File "C:\Python27\lib\site-packages\pip-8.1.1-py2.7.egg\pip\__init__.py", line 207, in main
cmd_name, cmd_args = parseopts(args)
File "C:\Python27\lib\site-packages\pip-8.1.1-py2.7.egg\pip\__init__.py", line 166, in parseopts
parser.print_help()
File "C:\Python27\lib\optparse.py", line 1670, in print_help
file.write(self.format_help().encode(encoding, "replace"))
File "C:\Python27\lib\optparse.py", line 1650, in format_help
result.append(self.format_option_help(formatter))
File "C:\Python27\lib\optparse.py", line 1633, in format_option_help
result.append(group.format_help(formatter))
File "C:\Python27\lib\optparse.py", line 1114, in format_help
result += OptionContainer.format_help(self, formatter)
File "C:\Python27\lib\optparse.py", line 1085, in format_help
result.append(self.format_option_help(formatter))
File "C:\Python27\lib\optparse.py", line 1074, in format_option_help
result.append(formatter.format_option(option))
File "C:\Python27\lib\optparse.py", line 316, in format_option
help_text = self.expand_default(option)
File "C:\Python27\lib\site-packages\pip-8.1.1-py2.7.egg\pip\baseparser.py", line 112, in expand_default
return optparse.IndentedHelpFormatter.expand_default(self, option)
File "C:\Python27\lib\optparse.py", line 288, in expand_default
return option.help.replace(self.default_tag, str(default_value))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 9-10: ordinal not in range(128)
答案 0 :(得分:-1)
当我想使用matplotlib时,故事开始了。我安装了'matplotlib-1.4.0.win32-py2.7.exe',然后我输入'来自pylab import *',它说我没有'六',所以我安装了'six-1.7.3.win32 -py2.7.exe'和'python-dateutil-2.2.win32-py2.7.exe'和'pyparsing-2.0.2.win32-py2.7.exe'和'numpy-1.8.1-win32-superpack -python2.7.exe”。最后,我再次输入'from pylab import *',出现错误:'UnicodeDecodeError:'ascii'codec无法解码位置7的字节0xbf:序数不在范围内(128)'
我问过我的朋友,他告诉我用pip来安装matplotlib,所以我安装了pip。
这就是我遇到上述错误的原因。我有一个好消息,我在ubuntu上使用了matplotlib,我现在决定使用ubuntu。谢谢你们帮助我。