question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't install Pandas on Mac M1

See original GitHub issue

Environment Mac M1 Python 3.8.2 created using Xcode Command Line Tools for M1 Macs

On trying to install pandas, it failed and it returns very long erorr message starts as below

(py382tf) mgd@MGD ~ % pip install pandas Collecting pandas Using cached https://files.pythonhosted.org/packages/8a/6f/7fcef020b5b305862cacf376183eaa0f907f2fa42f0b687b2a9a2c6cda4d/pandas-1.2.3.tar.gz Installing build dependencies … error ERROR: Command errored out with exit status 1: command: /Users/mgd/py382tf/bin/python3 /Users/mgd/py382tf/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/px/zqhcsbbx4yxfmhc7927tnfj00000gn/T/pip-build-env-orb4vxpv/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple – setuptools wheel β€˜Cython>=0.29.21,❀️’ β€˜numpy==1.16.5; python_version==β€™β€œ'β€β€˜3.7β€™β€œ'”’ and platform_system!=β€˜"β€™β€œβ€˜AIXβ€™β€β€˜"’’ β€˜numpy==1.17.3; python_version==β€™β€œ'β€β€˜3.8β€™β€œ'”’ and platform_system!=β€˜"β€™β€œβ€˜AIXβ€™β€β€˜"’’ β€˜numpy==1.16.5; python_version==β€™β€œ'β€β€˜3.7β€™β€œ'”’ and platform_system==β€˜"β€™β€œβ€˜AIXβ€™β€β€˜"’’ β€˜numpy==1.17.3; python_version==β€™β€œ'β€β€˜3.8β€™β€œ'”’ and platform_system==β€˜"β€™β€œβ€˜AIXβ€™β€β€˜"’’ β€˜numpy; python_version>=β€™β€œ'β€β€˜3.9β€™β€œ'β€β€˜β€™ cwd: None Complete output (4451 lines): Ignoring numpy: markers β€˜python_version == β€œ3.7” and platform_system != β€œAIX”’ don’t match your environment Ignoring numpy: markers β€˜python_version == β€œ3.7” and platform_system == β€œAIX”’ don’t match your environment Ignoring numpy: markers β€˜python_version == β€œ3.8” and platform_system == β€œAIX”’ don’t match your environment Ignoring numpy: markers β€˜python_version >= β€œ3.9”’ don’t match your environment Collecting setuptools Using cached https://files.pythonhosted.org/packages/9e/d4/b99a960314121a003e9f39c61dfde01a1010bb47661e193a7722f7f32d52/setuptools-54.2.0-py3-none-any.whl Collecting wheel Using cached https://files.pythonhosted.org/packages/65/63/39d04c74222770ed1589c0eaba06c05891801219272420b40311cd60c880/wheel-0.36.2-py2.py3-none-any.whl Collecting Cython<3,>=0.29.21 Using cached https://files.pythonhosted.org/packages/9e/98/bff39b3acaebbc6102be71797f655bbe60738f7339db4ad7bd0772c08daf/Cython-0.29.22-py2.py3-none-any.whl Collecting numpy==1.17.3 Using cached https://files.pythonhosted.org/packages/b6/d6/be8f975f5322336f62371c9abeb936d592c98c047ad63035f1b38ae08efe/numpy-1.17.3.zip Installing collected packages: setuptools, wheel, Cython, numpy Running setup.py install for numpy: started Running setup.py install for numpy: finished with status β€˜error’ ERROR: Command errored out with exit status 1: command: /Users/mgd/py382tf/bin/python3 -u -c β€˜import sys, setuptools, tokenize; sys.argv[0] = β€˜"’"’/private/var/folders/px/zqhcsbbx4yxfmhc7927tnfj00000gn/T/pip-install-x_x_2bsb/numpy/setup.pyβ€™β€œ'β€β€˜; file=β€™β€œ'β€β€˜/private/var/folders/px/zqhcsbbx4yxfmhc7927tnfj00000gn/T/pip-install-x_x_2bsb/numpy/setup.pyβ€™β€œ'β€β€˜;f=getattr(tokenize, β€˜"β€™β€œβ€˜openβ€™β€β€™β€œβ€˜, open)(file);code=f.read().replace(β€™β€β€˜"’\r\nβ€™β€œ'β€β€˜, β€˜"’"’\nβ€™β€œ'β€β€˜);f.close();exec(compile(code, file, β€˜"β€™β€œβ€˜exec’”’"β€˜))’ install --record /private/var/folders/px/zqhcsbbx4yxfmhc7927tnfj00000gn/T/pip-record-73r6zlw4/install-record.txt --single-version-externally-managed --prefix /private/var/folders/px/zqhcsbbx4yxfmhc7927tnfj00000gn/T/pip-build-env-orb4vxpv/overlay --compile --install-headers /Users/mgd/py382tf/include/site/python3.8/numpy cwd: /private/var/folders/px/zqhcsbbx4yxfmhc7927tnfj00000gn/T/pip-install-x_x_2bsb/numpy/ Complete output (4428 lines): Running from numpy source directory.

  Note: if you need reliable uninstall behavior, then install
  with pip instead of using `setup.py install`:

    - `pip install .`       (from a git repo or downloaded source
                             release)
    - `pip install numpy`   (last NumPy release on PyPi)


  blas_opt_info:
  blas_mkl_info:
  customize UnixCCompiler
    libraries mkl_rt not found in ['/Users/mgd/py382tf/lib', '/usr/lib']
    NOT AVAILABLE

  blis_info:
  customize UnixCCompiler
    libraries blis not found in ['/Users/mgd/py382tf/lib', '/usr/lib']
    NOT AVAILABLE

  openblas_info:
  customize UnixCCompiler
  customize UnixCCompiler
    libraries openblas not found in ['/Users/mgd/py382tf/lib', '/usr/lib']
    NOT AVAILABLE

  atlas_3_10_blas_threads_info:
  Setting PTATLAS=ATLAS
  customize UnixCCompiler
    libraries tatlas not found in ['/Users/mgd/py382tf/lib', '/usr/lib']
    NOT AVAILABLE

  atlas_3_10_blas_info:
  customize UnixCCompiler
    libraries satlas not found in ['/Users/mgd/py382tf/lib', '/usr/lib']
    NOT AVAILABLE

  atlas_blas_threads_info:
  Setting PTATLAS=ATLAS
  customize UnixCCompiler
    libraries ptf77blas,ptcblas,atlas not found in ['/Users/mgd/py382tf/lib', '/usr/lib']
    NOT AVAILABLE

  atlas_blas_info:
  customize UnixCCompiler
    libraries f77blas,cblas,atlas not found in ['/Users/mgd/py382tf/lib', '/usr/lib']
    NOT AVAILABLE

  accelerate_info:
  customize UnixCCompiler
    libraries accelerate not found in ['/Users/mgd/py382tf/lib', '/usr/lib']
  Library accelerate was not found. Ignoring
  customize UnixCCompiler
    libraries veclib not found in ['/Users/mgd/py382tf/lib', '/usr/lib']
  Library veclib was not found. Ignoring

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:34 (14 by maintainers)

github_iconTop GitHub Comments

38reactions
code280commented, Mar 25, 2021

Hello,

I faced the same problem, and solved it by doing the following steps:

  1. open finder
  2. locate terminal
  3. right click on the terminal icon
  4. click get info
  5. click open with rosetta
  6. open a new terminal
  7. use your normal package downloading method like β€œpip3 install pandas”

This should fix the issue.

7reactions
TheCaffeineDevcommented, Apr 23, 2021

I installed pandas in my M1 Macbook Pro today.

  • Installed Python 3.9.4 using Homebrew.
  • Then just did pip3 install pandas

It took a while but not more than 3 minutes though. It got successfully installed.

Here’s my log

❯ pip3 install pandas

Collecting pandas
  Downloading pandas-1.2.4.tar.gz (5.5 MB)
     |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 5.5 MB 855 kB/s
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting numpy>=1.16.5
  Using cached numpy-1.20.2-cp39-cp39-macosx_11_0_arm64.whl
Collecting pytz>=2017.3
  Downloading pytz-2021.1-py2.py3-none-any.whl (510 kB)
     |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 510 kB 8.8 MB/s
Collecting python-dateutil>=2.7.3
  Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
     |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 227 kB 10.5 MB/s
Requirement already satisfied: six>=1.5 in /opt/homebrew/lib/python3.9/site-packages (from python-dateutil>=2.7.3->pandas) (1.15.0)
Building wheels for collected packages: pandas
  Building wheel for pandas (PEP 517) ... /

done
  Created wheel for pandas: filename=pandas-1.2.4-cp39-cp39-macosx_11_0_arm64.whl size=9354006 sha256=87fead2b2cacdfdc448c444899dfffca3b82275635ac8d51a39790ede623e342
  Stored in directory: /Users/pks/Library/Caches/pip/wheels/1c/18/1d/96f6fb133a77724bc42fce621a44162d840d037b9289c4a874
Successfully built pandas
Installing collected packages: pytz, python-dateutil, numpy, pandas
Successfully installed numpy-1.20.2 pandas-1.2.4 python-dateutil-2.8.1 pytz-2021.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Trouble installing Pandas on new MacBook Air M1
Method-1 ... Open a terminal window. Run arch . The result should be arm64 . Now do arch -x86_64 zsh . This will...
Read more >
How to install Numpy and Pandas for data science in a M1 ...
How to install Numpy and Pandas for data science in a M1 MacBook. The new M1 chip MacBooks come with a nasty surprise...
Read more >
How to Install Python Pandas on MacOS? - GeeksforGeeks
Step 4: Enter the following command to install Pandas using pip3. pip3 install pandas. installing Pandas package on macOS using pip. Method 2:Β ......
Read more >
Install Pandas for python on Apple M1 silicon devices.
Once you installed ITerm, go to its β€œGet info” and check the box for β€œ Open Using Rosetta”, this makes every command you...
Read more >
Help installing pandas on M1 Mac... : r/learnpython - Reddit
I've got all my automations setup on my our new office mac but installing pandas fails every time. I have an important automation...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found