我在新构建的计算机上安装了新安装的 Ubuntu。我刚刚使用 apt-get 安装了 python-pip。现在,当我尝试 pip install Numpy 和 Pandas 时,它会出现以下错误。
我在 SO 和 Google 上的很多地方都看到过这个错误,但我一直无法找到解决方案。有人提到这是一个错误,一些线程只是死了......这是怎么回事?
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==1.5.4', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 185, in main
return command.main(cmd_args)
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 161, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 72: ordinal not in range(128)
最佳答案
我最近遇到了这个确切的问题并使用了
apt-get install python-numpy
这会将 numpy 添加到您的系统 python 解释器中。我可能不得不为 matplotlib 做同样的事情。要在 virtualenv 中使用,您必须使用
--system-site-packages
选项
关于python - PIP 安装 Numpy 抛出错误 "ascii codec can' t decode byte 0xe2",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26473681/