Getting pyenv
Set up pyenv on your M1 Mac.
brew install pyenv
Add the following to your .zshrc
file:
export PYENV_ROOT="$HOME/.pyenv"
export PATH
eval "$(pyenv init --path)"
Restart your terminal.
To test that pyenv is installed, run:
pyenv --version
Getting miniforge3
In this section, we will install miniforge3, a minimal installer for conda.
pyenv install miniforge3
pyenv versions
pyenv local miniforge3
Playing with conda
conda
conda list
conda init
Create a conda environment
conda create -y -n napari-env -c conda-forge python=3.9
conda activate napari-env
python -m pip install "napari[all]"
The quotes are needed for zsh shell.
Add the dev tools
pip install -e ".[pyside,dev]"
pip install -e ".[dev]"
pre-commit install
Add the testing tools
python -m pip install -e ".[testing]"
Run the tests
CI=1 pytest
Next steps
- Run IPython and test napari.
- Make a change to the code and run the tests.
- Run an example script.