If nbconvert throws a similar error, it is likely because the jupyter installation is not setup properly within a pyenv
ValueError: No template sub-directory with name 'python' found in the following paths:
/Users/aciuffo/Library/Jupyter
/opt/homebrew/Cellar/[email protected]/3.9.2_1/Frameworks/Python.framework/Versions/3.9/share/jupyter
/usr/local/share/jupyter
/usr/share/jupyter
brew uninstall python
brew install python
brew install pyenv
pyenv install X.Y.Z
-- use thepyenv install --list
to find the appropriate python versionpyenv global X.Y.Z
-- set the global pyenv version
in .zshrc:
PATH=$HOME/.pyenv/bin:$HOME/.pyenv/shims:$PATH # see note below
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
fi
Note I use a custom zsh script for adding paths oh-my-zsh_custom/add_paths.zsh
instead of directly adding to the PATH statement
#!/usr/bin/zsh
# Add any paths that could be included in the $PATH variable
# only paths that exist will be added
myPaths=($HOME/bin/ $HOME/bin/develtools $HOME/.local/bin /usr/local/opt/tcl-tk/bin /usr/local/opt/openssl/bin /usr/local/bin $HOME/.pyenv/bin $HOME/.pyenv/shims )
for each in "${myPaths[@]}"; do
if [ -d $each ]; then
# $path is a special array tied to the $PATH env var
# only unique entries are appended
path+=($each)
fi
done
Open a new shell and verify that the pyenv shell is active:
$ which python3
/Users/aciuffo/.pyenv/shims/python3
Then run:
pip3 install jupyter