Installing Python3.10.x Version on Mac and Set the Environment
MacOS already comes with Python2.7 and Python3.8 pre-installed. For specific reasons, I needed to install Python3.10.x separately. After installing the new Python version, some modifications to the default environment settings are required. This article serves as a memo detailing how to modify the environment settings after installing Python3.10 on a Mac.
Steps for Installing Python3.10.x and Modifying Environment Settings:
1. Install Python3.10.x
2. Configure environment variables for Python3.10.x
2. Scroll down to the bottom of the page and look for "Looking for a specific release?"
Tips: Use Ctrl+F to search for the Python version number you wish to download.
3. Navigate to the Python3.10.6 download page.
4. Double click Install program to install Python3.10.6
2. Configuring Environment Variables
Copy and paste following code into the bash_profile
3. Make the modified bash_profile file effective
Install Python3.10.x
1. Download Python Go to thePython official website's download page
, find the corresponding version, and proceed with the download. For the purpose of this article, I will be downloading Python3.10.6 as an example.



Configuring Environment Variables for Python3.10.x
1. Open the Terminal app, and edit “bash_profile”open ~/.bash_profileOpen the bash_profile file in the default editor on a Mac
![]() |
![]() |
PATH="/Library/Frameworks/Python.framework/Versions/3.10/bin:${PATH}" export PATH alias python="/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10"

source ~/.bash_profile
Comments
Post a Comment