![]() That is installed with a simple pip command. I use pipenv to manage python versions in my projects for those coming from node, it’s kind of a mixture of nvm and yarn. To prove it works, open a new terminal window and type ❯ python -V 3.10.1 Install pipenv This is what makes the terminal load the pyenv version on the CLI instead of the standard OS X one. The important part is the $(pyenv root)/shims in the $PATH. path file export PATH= "$(pyenv root)/shims.OTHER STUFF.: $PATH " I made changes to it: ❯ if command -v pyenv 1> /dev/null 2>&1 then eval "$(pyenv init -)" fi # This is actually a simplified version of what's in my. ![]() path file from that project handles the $PATH variable. I use the dotfiles concept to manage my CLI defaults. # make it the default version ❯ pyenv global 3.10.1 stackless-3.7.5 # the latest at the time of writing ❯ pyenv install 3.10.1. I install the main version with the following commands in Terminal # homebrew is still involved ❯ brew install pyenv # check which versions are available ❯ pyenv install -l Available versions: 2.1.3 2.2.3. But I found aliasing different versions for different projects always tricky when doing it that way Using pyenv to manage different versions of python ![]() You can also use homebrew to install python, with brew install python. I ignore that too Homebrew can manage python versions OS X also comes with python 3, which is available with the command $ python3. Given its age, it’s better ignored I treat it as an internal system tool, nothing to do with me. Mac OS X comes with its own version of python one which is deprecated since 2020.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |