Finding An Effective Python Environment

Finding An Effective Python Environment

Python Version Management Tools

pyenv

pyenv is a polular and marture open-source tool used in the Python development ecosystem on MacOS. (It is pyenv-win on windows). It allows developers to manage multiple Python installations on their system and easily switch between different Python versions. This is especially useful when you’re working on various Python projects that may have different version requirements.

1
2
3
4
5
6
7
8
9
10
11
12
$ pyenv verison
* system
3.7.9
3.8.13
$ python --version
Python 3.10.0
$ pyenv install 3.12.0 # this command takes time
$ pyenv versions
* system
3.7.9
3.8.13
3.12.0

pyenv has the advantage that the default system Python for other applications will not be overridden.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
$ pyenv global 3.12.0
$ pyenv verisons
system
* 3.12.0 (set by /Users/xxxxxx/.pyenv/version)

$ pyenv local 3.12.0
$ pyenv versions
system
* 3.12.0 (set by /Users/xxxxxx/.pyenv/.python-version)

$ pyenv shell 3.12.0
$ pyenv versions
system
* 3.12.0 (set by PYENV_VERSION environment variable)

$ python --version
Python 3.12.0

Python Virtual Environment

Python Package Management

Python Interpreters

Terminal Emulators & Shells

Text Editors

Finding An Effective Python Environment

https://songchen.science/blog/posts/28115c/

Author

Song Chen

Posted on

2023-10-11

Updated on

2023-10-26

Licensed under

Comments