shutil.which() not finding programs without appending file extension

后端 未结 1 682
渐次进展
渐次进展 2021-01-21 18:22

Trying to use shutil.which() to determine if git is installed. From the docs, I see which() on Windows should use PATHEXT to know which file extensions

相关标签:
1条回答
  • 2021-01-21 18:47

    Remove the trailing ; from your PATHEXT environment variable. It seems shutil.which() gets confused by this and interprets an empty string as a valid file extension, and therefore doesn't try to append any of the file extensions.

    More details here: "jupyter-kernelspec" not found while installing iqsharp however it exists on PATH

    0 讨论(0)
提交回复
热议问题