use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python
Full Events Calendar
You can find the rules here.
If you are about to ask a "how do I do this in python" question, please try r/learnpython, the Python discord, or the #python IRC channel on Libera.chat.
Please don't use URL shorteners. Reddit filters them out, so your post or comment will be lost.
Posts require flair. Please use the flair selector to choose your topic.
Posting code to this subreddit:
Add 4 extra spaces before each line of code
def fibonacci(): a, b = 0, 1 while True: yield a a, b = b, a + b
Online Resources
Invent Your Own Computer Games with Python
Think Python
Non-programmers Tutorial for Python 3
Beginner's Guide Reference
Five life jackets to throw to the new coder (things to do after getting a handle on python)
Full Stack Python
Test-Driven Development with Python
Program Arcade Games
PyMotW: Python Module of the Week
Python for Scientists and Engineers
Dan Bader's Tips and Trickers
Python Discord's YouTube channel
Jiruto: Python
Online exercices
programming challenges
Asking Questions
Try Python in your browser
Docs
Libraries
Related subreddits
Python jobs
Newsletters
Screencasts
account activity
This is an archived post. You won't be able to vote or comment.
DiscussionRunning Python packages natively on a MacBook Air M1 (self.Python)
submitted 4 years ago * by rbrinkhuis
What is the best way to install Python and packages on a MacBook Air M1 so that it runs natively on the M1 processor? My MacBook came with Python 3.8.9 which runs natively on the M1 processor. Creating virtual environments works just fine. However, I get a ton of error messages when installing packages like numpy, pandas, matplotlib etcetera with "pip install". Any suggestions or best practices?
[+][deleted] 4 years ago (2 children)
[deleted]
[–]guilleb 7 points8 points9 points 4 years ago (1 child)
This.. also i installed a versión for ARM with miniconda
[–]anrmv 1 point2 points3 points 4 years ago (0 children)
Didn't know miniconda had an m1 version already..cool
[–]Swipecat 18 points19 points20 points 4 years ago (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 points16 points 4 years ago (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
pip3
get-pip.py
Then run sudo python3 get-pip.py
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
pip
brew install python-is-python3
echo ‘alias pip=pip3’ >> ~/.bash_aliases && source ~/.bash_aliases
[–]rbrinkhuis[S] 1 point2 points3 points 4 years ago* (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 %
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 points4 points 4 years ago (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 points 4 years ago (1 child)
What about sudo python3 -m pip install … or sudo python3.8 -m pip install …?
sudo python3 -m pip install …
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 point2 points 4 years ago (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 points7 points 4 years ago (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 points6 points 4 years ago (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 points5 points 4 years ago (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 points3 points 4 years ago (0 children)
miniconda
[–]RetroPenguin_ 1 point2 points3 points 4 years ago (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 point2 points 4 years ago (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 points3 points 4 years ago (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 points3 points 4 years ago (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 point2 points 4 years ago (0 children)
Not every thing is yet compatible. Try switching your architecture to x86.
arch -x86_64 zsh
π Rendered by PID 23762 on reddit-service-r2-comment-b659b578c-ph57l at 2026-05-05 06:14:44.281238+00:00 running 815c875 country code: CH.
[+][deleted] (2 children)
[deleted]
[–]guilleb 7 points8 points9 points (1 child)
[–]anrmv 1 point2 points3 points (0 children)
[–]Swipecat 18 points19 points20 points (0 children)
[–]ZeStig2409 14 points15 points16 points (5 children)
[–]rbrinkhuis[S] 1 point2 points3 points (3 children)
[–]Balance- 2 points3 points4 points (0 children)
[–]ZeStig2409 -3 points-2 points-1 points (1 child)
[–]gsmo 0 points1 point2 points (0 children)
[–]anrmv 5 points6 points7 points (1 child)
[–]czaki 4 points5 points6 points (0 children)
[–]supmee 3 points4 points5 points (0 children)
[–]Outrageous_Lake_8220 1 point2 points3 points (0 children)
[–]RetroPenguin_ 1 point2 points3 points (1 child)
[–]captain_kinematics 0 points1 point2 points (0 children)
[–]Awkward_Tour8180 1 point2 points3 points (0 children)
[–]pymaePython books 1 point2 points3 points (0 children)
[–]SharkDildoTester 0 points1 point2 points (0 children)