Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 subprocess.Popen() 运行 python 模块“icdiff”。它没有将 icdiff 识别为命令并要求提供完整路径。icdiff 安装在 /usr/local/bin 中,但它因平台而异,对于某些平台,它位于 /usr/bin 中。
如何获取安装此 python 模块(icdiff)的路径。我试过了
sys.executable
但它总是给出“/usr/bin/python”。是否有任何命令可以用来获取存储 python 二进制文件的路径。