This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
it_python [2024/03/15 20:00] trinh created |
it_python [2024/11/28 10:32] (current) trinh |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Python ====== | + | ====== |
| + | |||
| + | Python can be complicated to set up, particularly if using virtual environments. | ||
| + | |||
| + | ===== Virtual environments and choosing a distribution ===== | ||
| + | |||
| + | I used to setup Python via Miniconda in order to have virtual python environments (see [[https:// | ||
| + | |||
| + | Instead, so far I really like the use of [[https:// | ||
| + | |||
| + | Setup seems quite simple. On Mac, use homebrew to install via | ||
| + | |||
| + | < | ||
| + | brew install pyenv | ||
| + | </ | ||
| + | |||
| + | You then need to include some scripts in your startup shell. | ||
| + | |||
| + | Then install a distribution via | ||
| + | |||
| + | < | ||
| + | pyenv install 3.12 | ||
| + | </ | ||
| + | |||
| + | will install the latest version of Python 3.12. Then you can select this distribution to use as your global one: | ||
| + | |||
| + | < | ||
| + | pyenv global 3.12 | ||
| + | </ | ||
| - | * Set up Miniconda in order to have virtual python environments: | ||