安装到(非 root)用户帐户后如何找到 python 命令行工具?

How do I locate python command line tools after installing to (non-root) user account?

在我的工作服务器上,我 运行 sudo pip install httpie 允许我执行 http google.com.

在我的学校服务器上 运行 pip install --user httpie。当我尝试使用该实用程序时,出现 http: command not found 错误。我知道该软件包安装在

/home/grads/me/.local/lib64/python2.7/site-packages/httpie

但我不太清楚如何注册命令行工具。我的工作服务器说命令位于 /usr/bin/http,但我无法在我的学校服务器上找到二进制文件。

我确实尝试过 find / |& grep http 之类的东西,但是要看的东西太多了。我假设我只需要向我的 PATH 添加一些内容,但问题是什么?

通常它们会安装到 ~/.local/bin

将其添加到您的路径中:

export PATH="$PATH":/home/grads/me/.local/bin

你应该能够运行你期望的命令。