bash:pip:找不到命令 [英] bash: pip: command not found

查看:127
本文介绍了bash:pip:找不到命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下载了pip并运行了python setup.py install,一切正常.本教程的下一步是运行pip install <lib you want>,但是在尝试在线查找任何内容之前,我收到一条错误消息:"bash:pip:not found".

I downloaded pip and ran python setup.py install and everything worked just fine. The very next step in the tutorial is to run pip install <lib you want> but before it even tries to find anything online I get an error "bash: pip: command not found".

这也是在Mac OS X上,这也是我的新手,所以我假设有些路径设置在我运行setup.py时未正确设置.我该如何进一步调查?我需要检查什么才能更好地了解问题的确切原因?

This is on Mac OS X, which I'm new too, so I'm assuming there's some kind of path setting that was not set correctly when I ran setup.py. How can I investigate further? What do I need to check to get a better idea of the exact cause of the problem?

我也尝试过为Mac安装Python 2.7,希望友好的安装过程能够完成所有工作,例如编辑PATH,以及根据教程使一切正常工作所需的其他一切,但这是行不通的.安装运行后,"python"仍运行python 2.6,并且PATH未更新.

I also tried installing Python 2.7 for Mac in the hopes that the friendly install process would do any housekeeping like editing PATH and whatever else needs to happy for everything to work according to the tutorials, but this didn't work. After installing is running 'python' still ran Python 2.6 and PATH was not updated.

推荐答案

为什么不只是做sudo easy_install pip,或者这是否适用于python 2.6 sudo easy_install-2.6 pip?

Why not just do sudo easy_install pip or if this is for python 2.6 sudo easy_install-2.6 pip?

这将使用默认的python软件包安装程序系统安装pip,并同时为您节省了手动设置的麻烦.

This installs pip using the default python package installer system and saves you the hassle of manual set-up all at the same time.

这将允许您运行pip命令以进行python软件包安装,因为它将与系统python一起安装.我还建议您在使用 virtualenv 包和模式进行点子设置之后. :)

This will allow you to then run the pip command for python package installation as it will be installed with the system python. I also recommend once you have pip using the virtualenv package and pattern. :)

这篇关于bash:pip:找不到命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆