密谋杀死了我的python安装 [英] Plotly killed my python install

查看:92
本文介绍了密谋杀死了我的python安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚尝试使用pip安装Plotly.我正在从Anaconda运行python,现在每次尝试运行任何python时,都会收到以下错误,并且我不知道如何解决.我正在Windows 7 64位,Python3、4上运行

I just tried to install Plotly using pip. I am running python from Anaconda and now anytime I attempt to run anything python I get the following errors and I have no idea how to fix it. I am running on Windows 7 64bit, Python3,4

    PS Z:\> pip
Traceback (most recent call last):
  File "C:\Anaconda3\Scripts\pip-script.py", line 3, in <module>
    from pip import main
  File "C:\Anaconda3\lib\site-packages\pip\__init__.py", line 11, in <module>
    from pip.vcs import git, mercurial, subversion, bazaar  # noqa
  File "C:\Anaconda3\lib\site-packages\pip\vcs\mercurial.py", line 9, in <module>
    from pip.download import path_to_url
  File "C:\Anaconda3\lib\site-packages\pip\download.py", line 22, in <module>
    from pip._vendor import requests, six
  File "C:\Anaconda3\lib\site-packages\pip\_vendor\requests\__init__.py", line 58, in <module>
    from . import utils
  File "C:\Anaconda3\lib\site-packages\pip\_vendor\requests\utils.py", line 25, in <module>
    from .compat import parse_http_list as _parse_list_header
  File "C:\Anaconda3\lib\site-packages\pip\_vendor\requests\compat.py", line 77, in <module>
    import simplejson as json
  File "C:\Anaconda3\lib\site-packages\simplejson\__init__.py", line 112, in <module>
    from .scanner import JSONDecodeError
  File "C:\Anaconda3\lib\site-packages\simplejson\scanner.py", line 10, in <module>
    c_make_scanner = _import_c_make_scanner()
  File "C:\Anaconda3\lib\site-packages\simplejson\scanner.py", line 6, in _import_c_make_scanner
    from simplejson._speedups import make_scanner
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 4: invalid start byte
PS Z:\>

推荐答案

这是Anaconda的pip版本和最新版本的simplejson(在安装Plotly时安装的)之间的交互.

This is an interaction between Anaconda's version of pip and the latest version of simplejson (which was installed when you installed Plotly).

作为解决方法,

del C:\Anaconda3\lib\site-packages\simplejson

这将允许pip和Plotly重新工作.不幸的是,如果您曾经升级Plotly,此问题将再次发生,因此我们将在Plotly requirements.txt文件中添加解决方法,以防止将来发生这种情况. (在Python 2.6系统上,实际上只需要simplejson即可.)

This will allow pip and Plotly to work again. Unfortunately if you ever upgrade Plotly this problem will happen again, so we will add a workaround to the Plotly requirements.txt file that prevents this from happening in future. (Plotly only actually needs simplejson on Python 2.6 systems.)

与此相关的一个Anaconda问题已打开,我对此发表了评论: https://github.com /ContinuumIO/anaconda-issues/issues/238

There was an Anaconda issue open related to this that I've commented on: https://github.com/ContinuumIO/anaconda-issues/issues/238

Plotly Python API问题:找到一种解决方法,这样就不会再次发生(或对其他用户): https://github.com/plotly/python-api/issues/197

Plotly Python API issue re: finding a workaround so this doesn't happen again (or to other users): https://github.com/plotly/python-api/issues/197

这篇关于密谋杀死了我的python安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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