macOS – Python
Python is a programming language used in basic programming courses and in scientific computing. There is a wide range of additional add-ons called libraries available for Python. The optimal method to install Python depends on your requirements.
With these instructions you can install Python on a TUNI Mac computer. There are separate instructions for using Python on TUNI Windows and TUNI Linux computers.
Installation of Python for very basic needs
If you need Python to create simple programs or just practice, you can use the distribution that comes with the Xcode CommandLine Tools package. It is not recommended for use with large programs or projects, because the distribution in question is updated with the operating system, which can lead to compatibility issues.
A more versatile Python installation: Miniforge
When you need a versatile Python programming environment on a TUNI macOS computer, you should install it yourself. In this case, you can choose the version and libraries you need, and you can update them on a schedule of your own choosing. However, it is your responsibility to ensure that all security updates are installed promptly.
We recommend the open source Python installer Miniforge for this purpose. It uses the conda command to manage additional libraries.
To install Miniforge, follow these steps:
- Download the Miniforge installation package from: https://conda-forge.org/download/
- Select the distribution that matches your workstation's processor
- You can find out your processor type using these instructions
- Run the installation using the Terminal program (Terminal.app) when the download is complete.
- Type the following command at the command line: bash Downloads/Miniforge3-Darwin-arm64.sh
- Assuming that you downloaded the installation package to the Downloads folder
- Also note that "Miniforge3-Darwin-xxxx.sh" must match the installation package that you downloaded.
- Press “enter”
- Give Terminal permission to read the Downloads folder if prompted
- The installer will then display the license agreement
- Press enter and press the down arrow until the installer asks you to accept the license.
- Note that the program requires you to type “yes” and press enter to continue the installation
- Next, you will be asked for a location for the installation.
- You can install the package in the default location by pressing “enter”.
- After this, a long amount of text will be printed on the screen while miniforge is installed
- After the installation, you will be asked if you want “conda” to start automatically when you open your terminal
- You should answer “yes” again and press “enter”.
- Type the following command at the command line: bash Downloads/Miniforge3-Darwin-arm64.sh
- Once Miniforge is installed, you should restart the Terminal.
Anaconda and Miniconda are no longer recommended
This page previously recommended Anaconda, Inc.'s Python distribution as the basis for a versatile Python installation. Due to changes in the license terms, Anaconda is no longer recommended.
For more information on the topic, see the Python TUNI on Windows computers section “Migrating from Anaconda and Miniconda to Miniforge”
If you have been using Anaconda, the instructions above can be used to help you migrate to Miniforge, where applicable.
IT Helpdesk
0294 520 500
it-helpdesk [at] tuni.fi (it-helpdesk[at]tuni[dot]fi)
helpdesk.tuni.fi