寻找进行自我诊断的 pip 命令

Looking for pip command that does self diagnostics

Home Brew 具有用于自我诊断的 brew doctor 命令并推荐修复方法,例如检查和授予所需目录的权限。

例如:

$ brew doctor

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: The following directories are not writable by your user:
/usr/local/bin
/usr/local/etc
/usr/local/sbin
/usr/local/share
/usr/local/share/doc

You should change the ownership of these directories to your user.
  sudo chown -R $(whoami) /usr/local/bin /usr/local/etc /usr/local/sbin /usr/local/share /usr/local/share/doc

And make sure that your user has write permission.
  chmod u+w /usr/local/bin /usr/local/etc /usr/local/sbin /usr/local/share /usr/local/share/doc

pip是否有用于自我诊断和建议修复的等效命令?

pip 有一个命令(但我认为不如 brew doctor 全面),它列出了已安装软件包的过时版本和最新的可用版本,这在以下情况下很有用你:

  • 可能必须在问题出现之前将其隔离
  • 或者因为您怀疑可能存在依赖性问题
  • 或者只是要格外小心,以免其他东西损坏,并想看看该版本是否有任何已报告的问题
python -m pip list --outdated