通过pip安装py-spy,安装过程一切正常,但在执行py-spy命令时出现:
zsh: command not found: py-spy
这是由于pip将bin文件放置在了~/Library/Python/3.8/bin路径下,而该路径不是环境变量,添加环境变量即可
>>> vim ~/.zshrc
export PATH=$HOME/Library/Python/3.8/bin:$PATH
>>> source ~/.zshrc
一切正常了
通过pip安装py-spy,安装过程一切正常,但在执行py-spy命令时出现:
zsh: command not found: py-spy
这是由于pip将bin文件放置在了~/Library/Python/3.8/bin路径下,而该路径不是环境变量,添加环境变量即可
>>> vim ~/.zshrc
export PATH=$HOME/Library/Python/3.8/bin:$PATH
>>> source ~/.zshrc
一切正常了