在shell(mac)中设置python命令的路径

时间:2018-03-23 14:36:56

标签: python pythonpath

我想按如下方式运行python命令,没有pyahp或其他脚本的完整路径。它报告了错误。我必须添加整个路径,即... / site_packages /这是乏味的。我该如何直接运行它?

[~] python pyahp                                                      
/Library/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python: can't open file 'pyahp': 
[Errno 2] No such file or directory

我试图添加pythonpath,但它失败了。

  

出口   PYTHONPATH = “$ PYTHONPATH:/Library/Frameworks/Python.framework/Versions/3.6/lib”

0 个答案:

没有答案