Python은(Python) 최신 운영 체제(macOS 포함)의 애플리케이션에 널리 사용되는 프로그래밍 언어이자 프레임워크입니다. 그러나 Python은 (Python)Python 2와 Python 3 의 두 가지 버전으로 구분되는 경우가 많습니다 .
Python 2는(Python 2) macOS에 포함되어 있었지만 보안상의 이유로 더 이상 지원되지 않습니다. Python 3 만 공식적으로 지원됩니다. Python 2 와 함께 Mac 에 설치할 수 있지만 두 버전을 함께 설치하는 것은 권장되지 않습니다.

Python이(Python) 전혀 필요하지 않을 수도 있고 , 최신 버전만 설치하기를 원할 수도 있습니다. 확실하지 않은 경우 Mac(Mac) 에서 Python을(Python) 완전히 제거하는 방법을 아는 것이 좋습니다 . Mac 에서 Python을(Python) 제거하려면 아래 단계를 따르세요.
Mac(Your Mac) 에서 Python 버전(Python Versions) 식별
macOS 버전에 따라 두 개 이상의 Python 버전이 설치되어 있을 수 있습니다. 이는 일반적으로 Python 2 버전(Python 2) 과 Python 3 버전으로 나뉩니다 . Python 2는 (Python 2)Monterey 12.3 및 이후 버전 에서 제거될 때까지 macOS에 기본적으로 포함되었습니다 .
Mac 에서 Python을(Python) 제거하려면 먼저 설치된 버전을 식별해야 합니다. 아래 단계에 따라 이 작업을 수행할 수 있습니다.
터미널 사용
- Mac 에서 Command + Space 눌러 Spotlight 검색(Spotlight Search) 창을 불러 와 터미널을(Terminal) 엽니다 .
- Spotlight 에서 Terminal 을(Terminal) 입력 하고 Enter 를(Enter) 누르세요 .

- Mac 에 설치된 Python 2 버전 (있는 경우) 을 확인하려면 터미널(Terminal) 에 python –version을 입력하고 실행하세요 . 이것이 작동하지 않으면 Python 2가(Python 2) 설치되어 있지 않은 것입니다.
- 다음으로, 터미널(Terminal) 에 python3 –version을 입력하고 실행하여 Python 3가 (Python 3)Mac 에 설치되어 있는지 확인 하고, 설치되어 있다면 어떤 버전인지 확인하세요.

Python이(Python) 여러 개 설치되어 있는 경우 이 명령은 현재 경로 구성과 관련된
Python 설치 버전을 표시합니다 .
응용프로그램 폴더 확인 중
응용 프로그램(Applications) 폴더 에서 수동 Python 설치를 확인할 수도 있습니다 . 이렇게 하려면 다음 단계를 따르세요.
- Mac에서 Finder를 엽니다.
- Finder 에서 이동 메뉴를 클릭한 다음 드롭다운 메뉴에서 응용 프로그램을 선택하여 (Applications)응용 프로그램(Applications) 폴더 로 이동합니다 .

- " Python 3.x " 또는 " Python 2.x " 와 같은 Python 관련 응용 프로그램 폴더를 찾으십시오 . 여기서 x는 특정 버전 번호(예: Python 3.11 )를 나타냅니다.

(Remember)Mac 컴퓨터에는 다양한 Python 버전이 공존할 수 있으므로 수정을 수행하기 전에 어떤 버전이 설치되어 있는지 확인하는 것이 중요합니다
.
macOS에서
Python을(Python) 수동으로 제거
Mac 에서 Python을(Python) 수동으로 제거하려면 서로 다른 두 위치에서 파일을 제거해야 합니다. 여기에는 프레임워크 파일( Python(Python) 애플리케이션을 실행하는 데 필요한 핵심 파일 )과 Python 실행 파일 자체가 포함됩니다.
Python 프레임워크 파일 제거
Mac 에서 Python 프레임워크 파일을 수동으로 제거하려면 아래 단계를 따르세요.
- Finder를(Finder) 열고 Go > Go to Folder를(Folder) 누른 다음 팝업 상자에 /Library/Frameworks/Python.framework를 입력하고 선택합니다.

- 여러 버전의 Python이 설치되어 있는 경우 (Python)버전(Versions) 하위 폴더 에서 Python 2 또는 Python 3.xx 등 제거하려는 특정 버전 폴더를 식별합니다 .

- 삭제를 진행하기 전에 이 버전의 Python을(Python) 사용하여 개발했을 수 있는 필수 데이터나 프로젝트를 백업했는지 확인하세요 .
- 다음으로 터미널 앱을 엽니다.
- Terminal 에서 다음 명령을 입력하고 실행하여 Python 폴더를 제거합니다. /Path/To/ Python .framework를 삭제하려는 (Python)Python 폴더의 실제 경로로 바꾸고 , 잘못된 폴더 경로를 입력하지 않도록 각별히 주의하세요. : sudo rm -rf /Path/To/Python.framework (예: sudo rm -rf /Library/Frameworks/Python.framework/Versions/3.9/ ).
- 이 명령을 실행하려면 관리자 비밀번호를 입력하라는 메시지가 표시될 수 있습니다. 계속 진행하려면 비밀번호를 입력하고 삭제를 확인하세요.

/usr/local/bin Directory 에서 Python 제거
Python 설치는 일반적으로 /usr/local/bin 폴더에 실행 파일을 추가합니다. 위 단계를 사용하여 Python(Python) 파일을 제거한 경우 나중에 호환성 문제를 방지하려면 일치하는 실행 파일이나 Python 용 syslink(syslinks) ( 터미널(Terminal) 바로 가기)를
제거해야 합니다 .
- 이러한 실행 파일을 제거하려면 터미널을 열고 (Terminal)터미널(Terminal) 에 다음 명령을 입력하여 /usr/local/bin 디렉토리 에 있는 모든 Python 관련 파일을 나열하십시오 . ls -l /usr/local/bin |그렙 '파이썬'
- 이 명령은 'python.h'라는 단어가 포함된 모든 파일을 표시합니다. '(’ Identify) 제거하려는
Python 버전과 관련된 파일을 식별합니다.
- 이러한 파일을 제거하려면 Terminal(Terminal) 에서 다음 명령을 입력하고 실행합니다 . 이때 file_name을 삭제하려는 파일의 실제 이름으로 바꾸고 명령을 실행하기 전에 각별히 주의해야 합니다. sudo rm -rf /usr/local/bin/file_name

이 시점에서 선택한 Python 버전과 관련된 모든 파일이 제거됩니다. 제거하려는 특정 버전과 연결된 각 Python 관련 파일을 제거하려면 이 단계를 (Python-related)반복하세요 . (Repeat)제거하려는
다른 Python 버전 에 대해 이 단계를 반복할 수도 있습니다 .
Homebrew를 사용하여 Python 제거
Homebrew 는 (Homebrew)터미널(Terminal) 에서 사용할 수 있는 널리 사용되는 macOS용 타사 패키지 관리 도구입니다 . App Store를 사용하지 않고
타사 Mac 응용 프로그램을 설치(install third-party Mac applications) 하려는 경우 자주 사용하게 됩니다 .
Homebrew를(Homebrew) 사용하여 Mac 에 Python을(Python) 설치한 경우 다음 단계에 따라 동일한 도구를 사용하여 쉽게 제거할 수 있습니다.
- Mac에서 터미널 앱을 엽니다.
- 터미널(Terminal) 에서 Brew list 명령을 입력하고 실행합니다. 그러면 이전에 Homebrew를(Homebrew) 통해 설치한 모든 설치된 패키지가 나열됩니다 (예: Python 3.11 의 경우 [email protected] ).

- 이러한 Python(Python) 패키지를 제거하려면 터미널(Terminal) 에서 Brew uninstall python_package 명령을 입력하고 실행합니다 . 이때 python_package를 이전 단계에서 식별한 적절한 패키지 이름(예: Brew uninstall [email protected])으로 바꿉니다.
- 패키지를 제거한 후, Brew cleanup python_package를 입력하고 실행하여 추가(지금은 불필요한) 파일을 제거하고 python_package를 올바른 이름(예: Brew cleanup [email protected])으로 바꿉니다.

이 시점에서 Homebrew를(Homebrew) 사용하여 설치한 Python 버전이 제거되었습니다. 그러나 여러 버전을 설치한 경우 다음 단계를 반복하여 해당 버전을 제거해야 할 수도 있습니다.
Mac에서 Python 사용하기
Mac 에서 Python을(Python) 완전히 제거해야 하는 경우 위의 단계를 수행하면 작업을 완료하는 데 도움이 됩니다. 즉, Python은 (give Python a try)배우기 가장 쉬운 프로그래밍 언어(easiest programming languages to learn) 중 하나이므로 자신만의 애플리케이션을 만들고 싶다면 두려워하지 마세요 .
Python 지식을 확장하는 좋은 방법은 새로운 Python 패키지를 사용해 보는 것입니다 . 타사 모듈을 쉽게 설치하고 관리할 수 있는 패키지 설치 프로그램인
Python PIP를 설치(installing Python PIP) 하면 됩니다 .
그러나 터미널(Terminal) 앱을 사용하는 데 익숙해져야 합니다 . 다음에는 macOS 시스템을 관리하기 위해
몇 가지 중요한 터미널 명령을(important Terminal commands) 시험해 볼 수 있습니다 .
How to Completely Uninstall Python on Your Mac
Python is a poрular programming language and framework for applications on modern operating systems (including macOS). However, Python is often split into two distinсt versions—Python 2 and Python 3.
Python 2 used to be included in macOS, but it’s no longer supported for security reasons. Only Python 3 is officially supported. While you can install it on your Mac alongside Python 2, having the two versions installed together isn’t recommended.

You may not need Python at all, or you may just want the latest version installed. If you’re unsure, it’s a good idea to know how to completely uninstall Python on your Mac. To remove Python from your Mac, follow the steps below.
Identifying Python Versions on Your Mac
Depending on your version of macOS, you might have two (or more) versions of Python installed. These are usually split between versions of Python 2 and Python 3. Python 2 was included by default in macOS up until it was removed in Monterey 12.3 and later versions.
If you’re going to remove Python from your Mac, you need to identify which version is installed first. You can do this by following the steps below.
Using Terminal
- Open Terminal on your Mac by pressing Command + Space to bring up the Spotlight Search bar.
- In Spotlight, type Terminal and press Enter.

- Type and run python –version in the Terminal to see the Python 2 version installed on your Mac (if any). If this doesn’t work, there’s no Python 2 installed.
- Next, type and run python3 –version in the Terminal to see if Python 3 is installed on your Mac and, if so, what version it is.

Keep in mind that if you have multiple Python installations, these commands will display the version for the Python installation associated with the current path configuration.
Checking Applications Folder
You can also check for any manual Python installations in the Applications folder. To do this, follow these steps.
- Open Finder on your Mac.
- Navigate to the Applications folder by clicking on the Go menu in Finder and then selecting Applications from the drop-down menu.

- Look for any Python-related application folders, such as “Python 3.x” or “Python 2.x“, where x denotes a specific version number (eg. Python 3.11).

Remember that various Python versions can co-exist on your Mac computer, so it’s important to identify which versions are installed before attempting to perform any modifications.
Manually Uninstalling Python from macOS
Removing Python manually from your Mac will require you to remove files from two different locations. This includes the framework files (the core files needed for Python applications to run) and the Python executable files themselves.
Removing Python Framework Files
To manually uninstall Python framework files from your Mac, follow the steps below.
- Open Finder, press Go > Go to Folder, then type and select /Library/Frameworks/Python.framework in the pop-up box.

- If you have multiple versions of Python installed, identify the specific version folder you wish to uninstall, such as Python 2 or Python 3.x.x, in the Versions sub-folder.

- Before proceeding with deletion, make sure you’ve backed up any essential data or projects you may have developed using this version of Python.
- Next, open the Terminal app.
- In the Terminal, type and run the following command to remove the Python folder, replacing /Path/To/Python.framework with the actual path to the Python folder you wish to delete, and using extreme caution not to type in the wrong folder path: sudo rm -rf /Path/To/Python.framework (eg. sudo rm -rf /Library/Frameworks/Python.framework/Versions/3.9/).
- You might be prompted to enter your administrator password to execute this command. Enter your password and confirm the deletion to proceed.

Removing Python from the /usr/local/bin Directory
Python installation typically adds executables to the /usr/local/bin folder. If you’ve removed Python files using the steps above, you’ll need to remove any matching executables or syslinks for Python (the Terminal shortcuts to it) to avoid compatibility issues later.
- To remove these executables, open Terminal, and list all Python-related files in the /usr/local/bin directory by entering the following command in Terminal: ls -l /usr/local/bin | grep ‘python’
- This command will display all files that contain the word ‘python.’ Identify the files associated with the version of Python you wish to uninstall.
- To remove these files, enter and run the following command in Terminal, replacing file_name with the actual name of the file you want to delete and using extreme caution before executing the command: sudo rm -rf /usr/local/bin/file_name

At this point, all of the relevant files for your chosen Python version will be removed. Repeat these steps to remove each Python-related file associated with the specific version you’re uninstalling. You can also repeat these steps for other Python versions that you wish to remove.
Using Homebrew to Uninstall Python
Homebrew is a popular, third-party package management tool for macOS that you can use from the Terminal. You’ll often use it if you want to install third-party Mac applications without using the App Store.
If you’ve installed Python on your Mac using Homebrew, you can easily uninstall it using the same tool by following these steps.
- Open the Terminal app on your Mac.
- In the Terminal, type and run the brew list command. This will list any installed packages that you’ve previously installed via Homebrew (eg. [email protected] for Python 3.11).

- To uninstall these Python packages, type and run the brew uninstall python_package command in the Terminal, replacing python_package with the appropriate package name you identified in the previous step (eg. brew uninstall [email protected]).
- After removing the packages, type and run brew cleanup python_package to remove any additional (and now unnecessary) files, replacing python_package with the correct name (eg. brew cleanup [email protected]).

At this point, the version of Python that you installed using Homebrew has been removed. If you’ve installed multiple versions, however, you may need to repeat these steps to remove those versions next.
Using Python on your Mac
If you need to completely uninstall Python on your Mac, the steps above will help you get the job done. That said, don’t be afraid to give Python a try if you’re looking to create your own applications, as it’s one of the easiest programming languages to learn.
A good way to expand your Python knowledge is to try out new Python packages. You can do this by installing Python PIP, a package installer that allows you to easily install and manage third-party modules.
You’ll need to be comfortable using the Terminal app, however. You can try out some important Terminal commands to manage your macOS system next.