spanishose.blogg.se

Install specific version of python
Install specific version of python





install specific version of python

  • pyenv uninstall  to uninstall an already installed Python version.
  • pyenv local  to set an installed Python version for a given project folder.
  • pyenv global  to set an installed Python version as global.
  • pyenv versions to see the installed Python versions.
  • pyenv install -list to see the available Python versions you can install.
  • So, to sum up, you have the following useful commands at your disposal: Also, if you run python -V in that folder, you will see the local version, and not the global one. This will create a .python-version file in the folder indicating the current local Python version for the project. To set a local version, go to the project folder in the terminal:Ĭd ~/path/to/the/project/folderĪnd set the local version, for example, 3.9.1: With Pyenv, you can have a global and a local version for each project. If you want to check your global version, just run: You can change that, of course, by executing the command again with the desired installed version. For example, if you have already installed 3.8.8, you can set it as the global version running: Pyenv versionsĪlso, you can set the global version that you want to use in your system, this will be the default one. To see all the installed versions, just run: You can run that command with any version that you want to have installed on your computer. You can pick one to install it, let's say 3.9.1: You will see a large list of Python versions. Now let's take a look at the possible Python versions that you can install through Pyenv, executing: That's it! You have installed Pyenv successfully. An example if you have .bashrc:Ĭd source. After the installation, edit your used shell startup script (.bashrc, .zshrc, .bash_profile. To install it on other platforms, you can watch this section in the GitHub docs. On macOS, you can install this tool using Homebrew:īrew install pyenv
  • Create and manage virtual environments.
  • Set/change a Python version locally for a project.
  • install specific version of python

    Set/change the global(default) Python version in your computer.Pyenv is a tool used to manage different Python versions. You will be able to install, uninstall, update, etc in one virtual environment, without affecting the rest of them.Īs mentioned, there are many tools to do this, and I will talk about the ones I find easy to understand and use. Many combinations of compatibility issues can be found but by having those isolated environments you can avoid them. Also, you may need a determined version of a package in one project and another version for others.Īs well as this, a determined version of a package can generate conflicts with packages or Python versions. It's common for certain package versions to be supported only by determined Python versions. Each big colored box represents a Python virtual environment.







    Install specific version of python