PIP安装Numpy引发错误"ASCII编解码器无法解码字节0xe2". [英] PIP Install Numpy throws an error "ascii codec can't decode byte 0xe2"

查看:89
本文介绍了PIP安装Numpy引发错误"ASCII编解码器无法解码字节0xe2".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在新构建的计算机上全新安装了Ubuntu.我刚刚使用apt-get安装了python-pip.现在,当我尝试点安装Numpy和Pandas时,会出现以下错误.

I have a freshly installed Ubuntu on a freshly built computer. I just installed python-pip using apt-get. Now when I try to pip install Numpy and Pandas, it gives the following error.

我已经在SO和Google的很多地方看到了这个错误,但是我找不到解决方案.有人提到这是一个错误,有些线程已经死了……这是怎么回事?

I've seen this error mentioned in quite a few places on SO and Google, but I haven't been able to find a solution. Some people mention it's a bug, some threads are just dead... What's going on?

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)

推荐答案

我最近遇到了这个确切的问题并使用了

I had this exact problem recently and used

apt-get install python-numpy

这会将numpy添加到系统python解释器中.我可能不得不对matplotlib做同样的事情.要在virtualenv中使用,必须使用

This adds numpy to your system python interpreter. I may have had to do the same for matplotlib. To use in a virtualenv, you have to create your environment using the

--system-site-packages

选项

http://www.scipy.org/install.html

这篇关于PIP安装Numpy引发错误"ASCII编解码器无法解码字节0xe2".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆