Install older versions of Python using Miniconda on a Mac with M1 processor.Balasundar
3 min read
Subscribe to my newsletter and never missmy upcoming articles
Download miniconda from their official website. There are two options to download Miniconda. One is downloading as a bash(.sh) file and another way is download as a package(.pkg) file. Here we are going to install Miniconda package file. Go to the Downloads folder and double click on the downloaded Miniconda package file. Install Miniconda Mac Os Catalina; Mac Os Download For Windows; Install Miniconda Mac; Miniconda is a minimal installer for Conda, Python, their dependencies and a small collection of packages. Conda itself fulfills two functions: Conda is a package manager, i.e. Think of it as an App Store where you can get apps for your command-line interface.
Lots of the people who are using Mac with M1 processor are struggling to install Python's older versions(Ex: 3.6 and 3.7) on their machine. In this article, we are going to see how we can install Python's older versions on a Mac with M1 processor.
Install home brew at /usr/local/bin:
To install older Python versions, the home brew should be installed at
Follow the below steps to install the home brew at /usr/local/bin.
- Open finder -> click on Applications.
- Double click on Utilities.
- Right click on Terminal -> and select Get info from the options.
- Select the Open using Rosetta check box.
Close the window. Open Terminal and run the below command to install home brew.
We can verify the installation directory by using
Miniconda is a free minimal installer for conda. It is a small, bootstrap version of Anaconda that includes only conda, Python, the packages they depend on, and a small number of other useful packages, including pip, zlib and a few others.
Download miniconda from their official website.There are two options to download Miniconda. One is downloading as a bash(.sh) file and another way is download as a package(.pkg) file.
Here we are going to install Miniconda package file.Go to the Downloads folder and double click on the downloaded Miniconda package file.
Just follow the installation instructions and accept the end-user agreement.
Creating Virtual Environment:
Create the virtual environment by executing the below command. Note: replace 3.6.12 with the Python version you want to install and replace env_name with your environment name.
Enter y to proceed.
It may take some time depending upon your internet connection and system speed.
Activate the virtual environment using the following command.
Now you can install your project's requirements.
Bonus Tips - How to resolve libmagic import error on M1 Mac:
If you have libmagic in your project requirement and getting the ImportError like show below.
raise ImportError('failed to find libmagic. Check your installation')
Miniconda Download For Mac Os
ImportError: failed to find libmagic. Check your installation
It can be fixed by following the below steps.
- Install libmagic using the brew (/usr/local/bin/brew).
OROpen terminal using Rosetta like shown above and run
Copy paste the below command and press Enter once the installation is completed.
Thank you for reading.
Anaconda Python Mac Download
Please share your feedback and suggestion. I would love to connect with you at LinkedIn.