this repository contains python3 code snippets for repetitive problems and understanding new concepts
brew search python
brew install python@3.10
brew info python@3.10
console outputs:
/opt/homebrew/opt/python@3.10/bin/python3
/opt/homebrew/opt/python@3.10/bin/python3 -m venv ~/VENV/metal3.10
select the interpreter -> enter interpreter path -> ~/VENV/metal3.10/bin/python3.10
In VS code terminal after the VENV is activate:
python3 -m pip uninstall -y tensorflow tenstensorflow-macos tensorflow-metal tensorflow-federated
python3 -m pip install -r requirements.txt
(optional) from a terminal
# <venv_paht>/bin/activate
source ~/VENV/metal3.10/bin/activate
pip install --upgrade pip
pip install -r <path>/requirements.txt
deactivate
source ~/VENV/metal3.10/bin/activate
pip install ipykernel
ipython kernel install --user --name=metal3.10
Then you need to restart the vs code, to select the venv as jupyter notebook kernel,
projectname/name is metal3.10
, which is the venv name.
Reference: