Plotly 杀死了我的 python 安装
问题描述
我只是尝试使用 pip 安装 Plotly.我正在从 Anaconda 运行 python,现在每当我尝试运行任何 python 时,我都会收到以下错误,我不知道如何修复它.我在 Windows 7 64bit, 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:Anaconda3Scriptspip-script.py", line 3, in <module>
from pip import main
File "C:Anaconda3libsite-packagespip\__init__.py", line 11, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "C:Anaconda3libsite-packagespipvcsmercurial.py", line 9, in <module>
from pip.download import path_to_url
File "C:Anaconda3libsite-packagespipdownload.py", line 22, in <module>
from pip._vendor import requests, six
File "C:Anaconda3libsite-packagespip\_vendorequests\__init__.py", line 58, in <module>
from . import utils
File "C:Anaconda3libsite-packagespip\_vendorequestsutils.py", line 25, in <module>
from .compat import parse_http_list as _parse_list_header
File "C:Anaconda3libsite-packagespip\_vendorequestscompat.py", line 77, in <module>
import simplejson as json
File "C:Anaconda3libsite-packagessimplejson\__init__.py", line 112, in <module>
from .scanner import JSONDecodeError
File "C:Anaconda3libsite-packagessimplejsonscanner.py", line 10, in <module>
c_make_scanner = _import_c_make_scanner()
File "C:Anaconda3libsite-packagessimplejsonscanner.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:Anaconda3libsite-packagessimplejson
这将允许 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
相关文章