This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
it_python [2024/03/23 23:44] trinh |
it_python [2024/11/28 10:32] (current) trinh |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Notes in getting start with Python ====== | ====== Notes in getting start with Python ====== | ||
- | Python can be complicated to set up, particularly if using virtual environments. I need to fill this guide in the near future. | + | 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: | ||