What is the safest way to removing Python framework files that are located in different place than Brew installs

て烟熏妆下的殇ゞ 提交于 2019-11-27 17:03:27
cathy.sasaki

I'll self-answer. I went through steps and it's straight forward. Pycharms (the IDE I'm use) automatically found the new libraries too. Here are the steps I followed to remove the extra Python libraries on Mavericks that were not native to it and not installed by brew.

Step 1: The native Python 2.7.x version lives here /System/Library/Frameworks/Python.framework/Versions/2.7 (or 2.6, etc), so you can remove any Python that got installed elsewhere.

sudo rm -rf /System/Library/Frameworks/Python.framework/

Or, according to this article, you should brew install both python 2.7 and python 3.x, and avoid using system python in Mavericks.

Step 2: Remove python in Applications directory (the one where all your apps are).

cd into folder /Applications and ls | grep Python to see what have.

Then remove: sudo rm -rf "Python 3.3"

Step 3:

>>> brew prune

sample output:

Pruned 0 dead formula Pruned 46 symbolic links from /usr/local

Step 4: Run steps recommended by brew doctor

sudo brew link python3

Sample output

Linking /usr/local/Cellar/python3/3.4.0... 19 symlinks created

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!