Conda and pip do not work at all

I'm on OS X 10.11.2, Anaconda Python 2.7.10.

I installed some dependencies, and suddenly my conda team started not working at all. Many people suggest conda install python=2.7.10 , but when I try (or any command, even just conda ), I get:

Traceback (last last call): File "/ Users / Can / anaconda / bin / conda", line 5, in sys.exit (main ()) File "/Users/Can/anaconda/lib/python2.7/site- packages / conda / cli / main.py ", line 106, mainly from conda.cli import conda_argparse File" /Users/Can/anaconda/lib/python2.7/site-packages/conda/cli/conda_argparse.py ", line 16, from from conda.cli.find_commands import find_commands, find_executable File "/Users/Can/anaconda/lib/python2.7/site-packages/conda/cli/find_commands.py", line 9, from from conda.utils import memoized file "/Users/Can/anaconda/lib/python2.7/site-packages/conda/utils.py", line 10, into import tempfile file "/Users/Can/anaconda/lib/python2.7/tempfile .py ", line 32, in import io as _io File" /Users/Can/anaconda/lib/python2.7/io.py ", line 51, in import _io ImportError: dlopen (/ Users / Can / anaconda / lib / python2.7 / lib-dynload / _io.so, 2): Symbol not found: __PyCodecInfo_GetIncrementalDecoder Link from: /Users/Can/anaconda/lib/python2.7/lib-dynload/_io.so Expected in: dynamic search

How can I restore conda without using conda myself (how can I not)?

UPDATE: I have completely uninstalled and reinstalled Anaconda. He still gives the same error. I tried pip and it also fails with the same error. I check that Anaconda pip as which pip returns /Users/Can/anaconda2/bin/pip . Why is the Anaconda broken?

+5
source share
1 answer

I had the same problem, it was successfully fixed simply by replacing the _io.so file.

 sudo find / -name _io.so 

copy the path to the _io.so file, which does NOT belong to python-2.7.11. For example, copy the path _io.so, which is under python-2.7.5: / usr / local / Cellar / python / 2.7.5 / Frameworks / Python.framework / Versions / 2.7 / lib / python2.7 / lib-dynload / _io.so

Replace the file '/Users/Can/anaconda/lib/python2.7/lib-dynload/_io.so' with the _io.so you just found.

 cp /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so /Users/Can/anaconda/lib/python2.7/lib-dynload/ 

Then it will work.

+6
source

Source: https://habr.com/ru/post/1239776/


All Articles