scriptswhe.blogg.se

Set up python on mac
Set up python on mac











set up python on mac

# OPENBLAS="$(brew -prefix openblas)" pip install numpy But, eventually, I got them installed with these steps: # brew install openblas sdl sdl_image sdl_mixer sdl_ttf portmidi While trying to install them, I got a nice variety of errors. Once that is installed, then you can install other things you need. The first thing you’ll need is wheel: # pip install wheel Now for any modules or libraries, you’ll want to use pip to install them. Then launch a new shell and verify: # which python To do this, add the following to your ~/.zshrc: # set up pyenv Next is to configure zsh to use the pyenv installation. * 3.9.0 (set by /Users/dwalker/.pyenv/version)Īs you can see from the output of pyenv versions above, it installed and is configured. But I selected 3.9.0 and set it as my global version: # pyenv install 3.9.0

set up python on mac

Once that’s done, you can get a list of the available python versions: # pyenv install -l So the first step after installing brew, if it’s not already installed is to install pyenv: # brew install pyenv For this to work, always authorize such requests. However, depending on your security settings, you may be asked if terminal can access certain resources. NOTE: None of the commands require any sort of privilege escalation.

set up python on mac

It’s this nice tool that lets you manage python environments. To get started, first you’ll need a working brew installation. And getting some working was much harder than it probably should have been. My main use for Python is number crunching, so I have a few specific Python packages I need. There are various tutorials on getting Python on macOS working, but I ran into a few issues, so I’d thought I’d bring it all together in one place. But, you should never use the system python anyway. For some inexplicable reason, the system python is still 2.7. And of course, all the BASH and awk code was no issues either.Īnd that brings us to Python.

set up python on mac

But Just installing some packages with Brew and it all compiled just fine. 3/4 of my C code was written on macOS originally as well. Any Perl code I had would have been originally written on macOS, so it worked just fine. So having recently gone back to the Mac after a 7 year hiatus to try out using Linux as a desktop environment meant getting 7 years worth of code working.













Set up python on mac