![]() If a particular project needs a different python version, then install that version first (if not installed already), navigate to the project folder, and set that version as local to that folder. To set pyenv version as default: pyenv global 3.7.0Ĭheck the python version and it should reflect the version set as above: python -version To install a specific version: pyenv install 3.7.0īy default, macOS picks the system python version. To see all pyenv available python versions: pyenv install -list if command -v pyenv 1>/dev/null 2>&1 then eval "$(pyenv init -)" fi Then restart the terminal so that the changes take into effect. ![]() bashrc, depending on the shell you are using. brew install pyenvĪlso add this code to your. We can install python using Homebrew with brew install python or for a specific version brew install but using Pyenv is a better way of handling different versions. ![]() Or check their official page - for instructions and troubleshooting ruby -e "$(curl -fsSL )" Installing Pyenv ![]() Simply run the below code to install homebrew from its git repo. This is my one-stop package manager for installing some of the packages like - java, scala, apache-spark, python… There are other package managers like MacPorts, but Homebrew is easy and popular. If you already have Homebrew, skip the next step. We will use Homebrew to install Pyenv and Pipenv. This is a great way of working on different projects locally without any hassles. Pyenv is to manage Python versions, and Pipenv is to create virtual environments required for each project and manage python packages and their dependencies for each project.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |