Apple M1 — Python, Pandas and Pipenv

The new macbooks with M1 Apple Silicon chips are fast and have superior battery life. However, setting up a development environment on these new models that relies on Pandas can be a pain. After going through Github issues and Stack Overflow pages, I hope this article can save time for those who would like to use Pipenv and Pandas on their M1 laptops.

Initial Setup

  • MacOS Big Sur version 11.0.1
  • Python 3.9.2 installed using brew
  • pip 21.0.1
  • Pipenv to manage environment

Installing Pandas in Pipenv

Activate pipenv shell on the project folder (mine is called “pipenv-project”)

Output:

The following commands are executed inside the pipenv shell.

Once completed, you can validate the installation by opening python shell (inside pipenv) and importing the two packages.

Output:

Note: The disadvantage of this method is that pipenv is not tracking these two packages.