Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.9k views
in Technique[技术] by (71.8m points)

macos - Python on my Mac is a mess, help me uninstall what I don't need

I'm unable to import numpy in Python 2.7 in the shell. I installed Python with brew install, then numpy with sudo pip install. I tried without sudo but I get a permission denied error. Anyway, I get this:

ImportError: dlopen(/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so, 2): Symbol not found: __PyErr_ReplaceException

Referenced from: /usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so
  Expected in: flat namespace

 in /usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so

In /usr/local/bin/ I have the following:

pip
pip2
pip2.7
pip3
pip3.4

And:

python
python-config
python2
python2-config
python2.7
python2.7-config
python3
python3-config
python3.4
python3.4-config
python3.4m
python3.4m-config
pythonw
pythonw2
pythonw2.7

The output of which python is /usr/local/bin/python

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

That output is normal. Have you tried running brew install openssl followed by brew link --force openssl and then brew install python. The following thread helps describe the issue https://github.com/Homebrew/homebrew/issues/40516


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...