- ChatGPT Explained Completely. (2023)
- The Hitchhiker's Guide to Python!
- Interpreter versions
- Using Python Environments in Visual Studio Code
- The Long Story of How Neural Nets Got to Where They Are: A Conversation with Terry Sejnowski (2023)
- PyPI · The Python Package Index
- Python (programming language)
- Project Jupyter
- Doing Data Science in Visual Studio Code
- What's New in Python
- The History of Python (all posts)
- Introduction and Overview (2009)
- PEP 20 – The Zen of Python (2004)
- macOS 12 or so
- Install Xcode or Command Line Tools
- Install Homebrew
- Install VS Code
- Python extension
- Jupyter extension
- brew install python
- python3
- brew install python@3.11
- brew install python@3.10
- brew install pypy3.9
- python3.11
- python3.10
- pypy3.9
Then in VS Code:
- ⇧⌘P
>Python: Select Interpreter- Refresh, then add if not found
- brew install pyenv
In your shell profile:
if [ -x "$(which pyenv)" ]; then
eval "$(pyenv init --path --no-rehash zsh)")"
fi
- pyenv install --list
- pyenv install 3.11.4
- pyenv local 3.11.4
- pyenv rehash
- pip3
- python3
- python3.10 -m venv myvenv
- source myvenv/bin/activate
- which python3
- python3 --version
- deactivate
- rm -r myvenv
Or in VS Code:
- ⇧⌘P
>Python: Create Environment…
Don't commit a virtual environment.
- brew install poetry
- poetry new foo
- pip install beep-boop-test
- pip freeze > requirements.txt
To recall them later:
- pip install -r requirements.txt
To upgrade:
- pip list --outdated
- pip install --upgrade beep-boop-test
- (Freeze again)
- pip install jupyter
- jupyter notebook
- ipython
- pip install jupyterlab
- jupyter lab
- Open the project folder
- Open a .py file
- ⇧⌘P
>Python: Select Interpreteror>Python: Create Environment… - ⇧↩︎ = ⇧⌘P
Python: Run Selection/Line in Python Terminal- REPL-driven development?
- Python › Analysis settings
- Enable Auto Import Completions
- Set Type Checking Mode to basic
- Make a debug launcher
- Open an .ipynb file
>Notebook: …
- ⇧⌘P
>Jupyter: Create Interactive Window
Install:
- brew install conda
- brew install conda-zsh-completion
- conda init zsh # or whatever shell
- Start a new tab
Use it:
- ⇧⌘P
>Python: Create Environment… - conda activate `pwd`/.conda
- conda install jupyter
- which jupyter
- conda env export > environment.yml
- conda deactivate
- rm -r .conda
- ⇧⌘P
>Python: Create Environment… - conda activate example
- which jupyter
To remove Conda:
- conda init --reverse zsh
- brew uninstall conda conda-zsh-completion