Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing simplejson kills pip on anaconda #197

Closed
scjody opened this issue Feb 26, 2015 · 3 comments · Fixed by #199
Closed

Installing simplejson kills pip on anaconda #197

scjody opened this issue Feb 26, 2015 · 3 comments · Fixed by #199

Comments

@scjody
Copy link

scjody commented Feb 26, 2015

@theengineear, from: http://stackoverflow.com/questions/28751216/plotly-killed-my-python-install?nah=1#28754036

Python 3.4 on Windows via Anaconda 2.1.0: installing simplejson (which is pulled in by Plotly's requirements.txt) kills 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

Can we not install simplejson unless it's really needed (Python 2.6 systems)? Or is there another way we can work around this Anaconda issue? (Logged for Anaconda as: ContinuumIO/anaconda-issues#238 )

@theengineear
Copy link
Contributor

Ah, bummer. Yeah, we wanted to unify the install process. Do you know of a way to have pip optionally install something depending on the python version?

@theengineear
Copy link
Contributor

@scjody , I think a good non-hacky workaround is to allow installing like this:

pip install plolty[PY2.6]

http://pythonhosted.org/setuptools/setuptools.html#declaring-extras-optional-features-with-their-own-dependencies

Then, we can just check and shoot out a warning explaining that.

@scjody
Copy link
Author

scjody commented Feb 27, 2015

Great idea!

achimnol added a commit to lablup/backend.ai-client-py that referenced this issue Nov 1, 2017
 * On some rare cases, Windows installation interferes with simplejson
   package.  Guide the users to install a pre-built binary when they
   encounter this issue.

   - ContinuumIO/anaconda-issues#291
   - ContinuumIO/anaconda-issues#238
   - plotly/plotly.py#197
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants