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

前端 未结 1 677
醉梦人生
醉梦人生 2020-12-04 07:33

I want to remove a Python installed in location that brew complains about, when I run brew doctor

Warning: Python is ins

相关标签:
1条回答
  • 2020-12-04 08:11

    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

    0 讨论(0)
提交回复
热议问题