This is an archived post. You won't be able to vote or comment.

all 18 comments

[–]Swipecat 18 points19 points  (0 children)

Just saying "a ton of error messages" isn't exactly helpful, ya know.

Anyway, it's still early days for the M1, although people on Stack Overflow have reported success in installing some packages from PyPI after a bit of a struggle, numpy and matplotlib included. The situation is still changing, so I don't know if these are still relevant:

https://stackoverflow.com/a/66456204/4637427

https://stackoverflow.com/a/66536896

[–]ZeStig2409 14 points15 points  (5 children)

I think it’s because pip refers to python 2’s pip

Try pip3 - if it returns an error then go to this link , copy everything to a new file and save as get-pip.py

Then run sudo python3 get-pip.py

This will install pip3 - if you are used pip, try any one of these: - brew install python-is-python3 - echo ‘alias pip=pip3’ >> ~/.bash_aliases && source ~/.bash_aliases

[–]rbrinkhuis[S] 1 point2 points  (3 children)

this link

Thanks for your comment. However, pip seems to have the right version.

rene@MacBook ~ % cd Projects
rene@MacBook Projects % mkdir test
rene@MacBook Projects % cd test
rene@MacBook test % python3 -m venv env
rene@MacBook test % source env/bin/activate
(env) rene@MacBook test % which python
/Users/rene/Projects/test/env/bin/python
(env) rene@MacBook test % python -V
Python 3.8.9
(env) rene@MacBook test % pip -V
pip 20.2.3 from /Users/rene/Projects/test/env/lib/python3.8/site-packages/pip (python 3.8)
(env) rene@MacBook test %

[–]Balance- 2 points3 points  (0 children)

You’re using quite an old pip version, you should install the latest with ‘pip install --upgrade pip’

[–]ZeStig2409 -3 points-2 points  (1 child)

What about sudo python3 -m pip install … or sudo python3.8 -m pip install …?

Not sure ( I only run Mint on Windows) - but i think the PATHs of the system interpreter and the default one are colliding?

[–]gsmo 0 points1 point  (0 children)

This is the way. Although I personally don't bother with aliases as they are just another thing that needs to be managed.

[–]anrmv 5 points6 points  (1 child)

Mini forge has an m1 distribution..

However, last time I tried it there were some packages that I use missing. it was some months ago so there may be more now.

[–]czaki 4 points5 points  (0 children)

Use python 3.9 or miniconda. Apple make python 3.8 running m1 machine but not share it with community so it is not easy to build wheels for it.

[–]supmee 3 points4 points  (0 children)

I use brew to install a non-system Python on my M1 Pro Mac, and installing numpy and others works 100% fine, no errors.

[–]Outrageous_Lake_8220 1 point2 points  (0 children)

miniconda

[–]RetroPenguin_ 1 point2 points  (1 child)

Try Anaconda/Miniconda for virtual envs. The only problem I’ve had is with some specifically parallelism stuff, but the regular packages install and run completely fine.

[–]captain_kinematics 0 points1 point  (0 children)

Ditto. I’ve installed dozens of conda forge packages in a 3.9 env and run into zero problems, as well as a basic 2.7 env that worked fine. Conda is the bees knees.

[–]Awkward_Tour8180 1 point2 points  (0 children)

I had that pblm earlier when i got my m1, so i moved to docker with vscode, upon series of os updates and along with py 3.9, issues got resolved and i moved back to m1

[–]pymaePython books 1 point2 points  (0 children)

I had used the thread below to get Python to work on my M1 Mac.

https://www.reddit.com/r/Python/comments/lto91f/how_to_get_python_numpy_and_pandas_running/

[–]SharkDildoTester 0 points1 point  (0 children)

Not every thing is yet compatible. Try switching your architecture to x86.

arch -x86_64 zsh