Atom hydrogen 内核问题:在 macbook pro 上使用 zsh 修复 PATH

Atom hydrogen kernel issue: Fixing PATH with zsh on macbook pro

我使用

在 Atom 上为 Python 安装了 hydrogen 内核
python -m pip install ipykernel
python -m ipykernel install --user

这样做之后,我收到了以下消息

WARNING: The script pygmentize is installed in '/Library/Frameworks/Python.framewo
rk/Versions/3.9/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning,
 use --no-warn-script-location.
  
WARNING: The scripts jupyter, jupyter-migrate and jupyter-troubleshoot are install
ed in '/Library/Frameworks/Python.framework/Versions/3.9/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning,
 use --no-warn-script-location.
  
WARNING: The scripts jupyter-kernel, jupyter-kernelspec and jupyter-run are instal
led in '/Library/Frameworks/Python.framework/Versions/3.9/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning,
 use --no-warn-script-location.

WARNING: The scripts iptest, iptest3, ipython and ipython3 are installed in '/Libr
ary/Frameworks/Python.framework/Versions/3.9/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning,
 use --no-warn-script-location.

WARNING: The scripts pip, pip3 and pip3.9 are installed in '/Library/Frameworks/Py
thon.framework/Versions/3.9/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning,
 use --no-warn-script-location.

如何解决此问题以避免将来出现问题?

将以下行添加到您的 .zprofile.zshenv 文件中:

PATH=/Library/Frameworks/Python.framework/Versions/3.9/bin:$PATH