I am on OS X 10.11.2, Anaconda Python 2.7.10.
I was installing some dependencies, and suddenly, my conda
command started not working at all. Many people suggest conda install python=2.7.10
but when I try that (or any command, even just conda
) I get:
Traceback (most recent call last): 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, in main from conda.cli import conda_argparse File "/Users/Can/anaconda/lib/python2.7/site-packages/conda/cli/conda_argparse.py", line 16, in 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, in from conda.utils import memoized File "/Users/Can/anaconda/lib/python2.7/site-packages/conda/utils.py", line 10, in 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 Referenced from: /Users/Can/anaconda/lib/python2.7/lib-dynload/_io.so Expected in: dynamic lookup
How can I repair conda
, without using conda
itself (as I can't)?
UPDATE: I've completely uninstalled and reinstalled Anaconda. It still gives the same error. I've tried pip
and it also fails with the same error. I verify it's Anaconda's pip as which pip
returns /Users/Can/anaconda2/bin/pip
. Why is Anaconda broken?
I had the same issue, it is successfully fixed by just replacing the _io.so file.
sudo find / -name _io.so
copy the path of the _io.so file which DOES NOT belong to python-2.7.11. For example, copy the path of _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 '/Users/Can/anaconda/lib/python2.7/lib-dynload/_io.so' file with the _io.so that 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With