This is part of support chapter for MindLake step-by-step tutorial for Python
- 🌟 0. Step by step tutorial
- 🌟 1. Configure Python In Your Local Environment
Here is an example of Python installation with official installer, you can also choose other package management tools like HomeBrew or Conda.
- Navigate to python.org, specifically to Downloads > MacOS and download the latest installation file.
- Click on the latest stable release of Python link under the latest Python releases for macOS. The latest available version of Python as of this writing is 3.11.3
- Now you'll be able to see the version-specific information. Scroll down on this page until you see a table with all available installation files.
- Select and download the file that in the description says macOS under the operating system.
To proceed with a default installation of Python, click the "Continue" button. Default option is recommended if you're new to Python and want to install it with standard features. Simply wait for the installation to complete and then click the "Close" button.
- Find and open "Terminal" or other shell terminal in LauchPad.
- Enter the following command in terminal:
python --version
An example of the output is:
Python 3.11.3
If you need to install Python from the command line on macOS, the Homebrew package manager is a reliable option. Follow the steps below to install Python via Homebrew:
- Open a browser and go to https://brew.sh.
- Under the "Install Homebrew" title, copy the command
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
3. Then open a terminal window, paste the copied command, and press the 'Enter' or 'Return' button.
4. Enter your macOS credentials if and when asked.
5. If prompted, install Apple's command line developer tools.
6. If prompted, copy, paste and execute the command to add Homebrew to your shell profile file.
- Enter the following command in terminal to upgrade Homebrew:
brew update && brew upgrade
- Install Python using this command:
brew install python3
Enter the following command in terminal:
python --version
An example of the output is:
Python 3.11.3
Here is an example of Python installation with official installer, you can also choose other package management tools like Anaconda.
- Go to the official Python download page for Windows.
- Find a stable Python 3 release. This tutorial was tested with Python version 3.11.3.
- Click the appropriate link for your system to download the executable file: Windows installer (64-bit) or Windows installer (32-bit).
- After the installer is downloaded, double-click the .exe file, for example python-3.11.3-amd64.exe, to run the Python installer.
- Select the Add python.exe to PATH checkbox, which enables users to launch Python from the command line.
- If you’re just getting started with Python and you want to install it with default features as described in the dialog, then click Install Now.
- Simply wait for the installation to complete and then click the Close button.
Press Win(⊞) + r in keyboard and enter cmd
to open the command prompt.
Enter the following command in the command prompt:
python --version
An example of the output is:
Python 3.11.3