Member-only story
Pyenv, an incredible Python library!
Hello everyone, today I will share with you an incredible Python library — pyenv.
Github address: https://github.com/pyenv/pyenv
In the process of Python development, developers often need to handle multiple different versions of Python, especially when maintaining multiple projects, which may rely on different versions of Python interpreters and libraries. In order to simplify the management of Python versions,pyenv
It is a very useful tool. It allows developers to easily install and switch between different versions of Python on the system, while creating isolated Python environments for each project.pyenv
Greatly simplifies the development workflow, ensuring that each project uses the correct Python version without affecting the global environment.
install
1. Throughcurl
install
pyenv
Can be done throughcurl
Easy installation, the following are the installation steps:
curl https://pyenv.run | bash
After installation is complete, follow the prompts to add the following content to the shell configuration file (such as.bashrc
、.zshrc
In (etc.):
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
Then restart the terminal or run the following command to make the configuration effective:
source ~/.bashrc