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

pip and conda stop working after installing library from PyPI #238

Closed
jboynyc opened this issue Jan 7, 2015 · 8 comments
Closed

pip and conda stop working after installing library from PyPI #238

jboynyc opened this issue Jan 7, 2015 · 8 comments

Comments

@jboynyc
Copy link

jboynyc commented Jan 7, 2015

On a fresh install of Anaconda (Py 3.4), having run conda update conda and having used conda to install pymongo, I then ran pip install python-instagram to install an additional library straight from PyPI. Now I am getting this error every time I try to run pip or conda:

Traceback (most recent call last):
  File "C:\Users\jboy1\Applications\Anaconda\Scripts\pip-script.py", line 3, in <module>
    from pip import main
  File "C:\Users\jboy1\Applications\Anaconda\lib\site-packages\pip\__init__.py", line 11, in <module>
    from pip.vcs import git, mercurial, subversion, bazaar  # noqa
  File "C:\Users\jboy1\Applications\Anaconda\lib\site-packages\pip\vcs\mercurial.py", line 9, in <module>
    from pip.download import path_to_url
  File "C:\Users\jboy1\Applications\Anaconda\lib\site-packages\pip\download.py", line 22, in <module>
    from pip._vendor import requests, six
  File "C:\Users\jboy1\Applications\Anaconda\lib\site-packages\pip\_vendor\requests\__init__.py", line 58, in <module>
    from . import utils
  File "C:\Users\jboy1\Applications\Anaconda\lib\site-packages\pip\_vendor\requests\utils.py", line 25, in <module>
    from .compat import parse_http_list as _parse_list_header
  File "C:\Users\jboy1\Applications\Anaconda\lib\site-packages\pip\_vendor\requests\compat.py", line 77, in <module>
    import simplejson as json
  File "C:\Users\jboy1\Applications\Anaconda\lib\site-packages\simplejson\__init__.py", line 112, in <module>
    from .scanner import JSONDecodeError
  File "C:\Users\jboy1\Applications\Anaconda\lib\site-packages\simplejson\scanner.py", line 10, in <module>
    c_make_scanner = _import_c_make_scanner()
  File "C:\Users\jboy1\Applications\Anaconda\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

I've deleted everything having to do with the Instagram library from site-packages, but the error persists. What could be causing this?

(This is on Windows 7.)

@badgh
Copy link

badgh commented Jan 29, 2015

I have the same problem. Have you resolved it?

@asmeurer
Copy link
Contributor

Perhaps pip uninstall simplejson. Or if that fails with the error delete the simplejson directory from site-packages.

@badgh
Copy link

badgh commented Jan 29, 2015

pip uninstall simplejson had the same error. I deleted the simplejson directory, now anaconda works. thanks. but still don't know what was the problem.

@asmeurer
Copy link
Contributor

I don't know either. Somehow simplejson broke things.

@jboynyc
Copy link
Author

jboynyc commented Feb 3, 2015

I solved it by reinstalling, but good to know that deleting simplejson from site-packages does the trick, too.

@tswicegood
Copy link

Sounds like this is fixed and/or out of our hands. Should we close this @asmeurer?

@ccordoba12
Copy link

You're right @tswicegood, there is no problem to be solved here.

@scjody
Copy link

scjody commented Feb 26, 2015

Is there any way to deal with this if you need simplejson to be installed? I tried deleting simplejson using the del command then running pip install --force-reinstall --upgrade pip simplejson in the hope that the latest simplejson and pip would work together, but the error persists. Note that this works on other Python installations such as installing from .deb packages on Ubuntu 14.04.

After upgrading pip the problem is even worse - deleting simplejson with the del command now gives:

Traceback (most recent call last):
  File "C:\Users\plotly\Anaconda3\lib\runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\plotly\Anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\plotly\Anaconda3\Scripts\pip.exe\__main__.py", line 5, in <module>
  File "C:\Users\plotly\Anaconda3\lib\site-packages\pip\__init__.py", line 15, in <module>
    from pip.vcs import git, mercurial, subversion, bazaar  # noqa
  File "C:\Users\plotly\Anaconda3\lib\site-packages\pip\vcs\mercurial.py", line 11, in <module>
    from pip.download import path_to_url
  File "C:\Users\plotly\Anaconda3\lib\site-packages\pip\download.py", line 30, in <module>
    from pip._vendor import requests, six
  File "C:\Users\plotly\Anaconda3\lib\site-packages\pip\_vendor\requests\__init__.py", line 59, in <module>
    from .models import Request, Response, PreparedRequest
  File "C:\Users\plotly\Anaconda3\lib\site-packages\pip\_vendor\requests\models.py", line 49, in <module>
    json_dumps = json.dumps
AttributeError: 'module' object has no attribute 'dumps'

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

No branches or pull requests

6 participants