pyenv – manage python versions

I wish that I new about pyenv when I started to programming in Python.

This tool makes it easy to manage and switch between different Python versions and environments.

To install it make sure that all prerequisites are met. Then use the pyenv-installer project like this to get the tool installed:

curl https://pyenv.run | bash

Enter fullscreen mode Exit fullscreen mode

When pyenv is available on your machine you can easily create a new virtual Python environment for your next project:

pyenv virtualenv 3.10.0 my_new_project

Enter fullscreen mode Exit fullscreen mode

This will create a new environment named, my_new_project, that is using the version 3.10.0 of Python.

And to activate the environment:

pyenv activate my_new_project

Enter fullscreen mode Exit fullscreen mode

There are many more features provided by the pyenv-tool that can be explored, read more at GitHub.

原文链接:pyenv – manage python versions

© 版权声明
THE END
喜欢就支持一下吧
点赞5 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容