# Leave Python virtual environment
deactivate
# Install Graphviz - Keras dependency
brew install Graphviz
# Example using Python 3.10.7
pyenv shell 3.10.7
mkvirtualenv py310
pip install --upgrade pip
TensorFlow is an end-to-end open source platform for machine learning.
# Activate the virtual environment
workon py310
# Install TensorFlow
if [[ "$(/usr/bin/uname -m)" == "arm64" ]]; then
# ARM macOS https://developer.apple.com/metal/tensorflow-plugin
pip install tensorflow-macos
pip install tensorflow-metal
else
# Intel macOS
pip install tensorflow
fi
Keras is a high-level neural networks API, written in Python and capable of running on top of TensorFlow, CNTK, or Theano.
# Activate the virtual environment
workon py310
# Install Keras
pip install h5py pydot keras
# Activate the virtual environment
workon py310
# Install libraries
pip install numpy \
pandas \
scipy \
pillow \
scikit-learn \
scikit-image \
sk-video
# Activate the virtual environment
workon py310
# Install libraries
pip install autopep8 \
Cython \
ipykernel \
progressbar2 \
pydocstyle \
pylint \
pytest \
requests \
markdown
# Activate the virtual environment
workon py310
# Install Matplotlib
pip install ipympl matplotlib
# Fix Matplotlib backend
mkdir -p "${HOME}/.config/matplotlib"
echo "backend : TkAgg" > "${HOME}/.config/matplotlib/matplotlibrc"
-
Install Node
# Leave Python virtual environment deactivate # Install Node brew install node
-
Install Jupyter Lab
# Activate Python environment workon py310 # Install Jupyterlab pip install jupyterlab jupyterlab_widgets ipywidgets
-
Install Jupyter Lab extensions
# Activate Python environment workon py310 # Install extensions pip install tensorboard jupyter-tensorboard jupytext # Check extensions status jupyter labextension list