Python:PIP安装路径,此插件和其他插件的正确位置是什么? [英] Python: PIP install path, what is the correct location for this and other addons?

查看:389
本文介绍了Python:PIP安装路径,此插件和其他插件的正确位置是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在安装Python时遇到了一些问题,结果,我刚刚重新安装了python,并试图使我所有的插件也能正常工作.之后,我将看一下virtualenv,看看是否可以防止这种情况再次发生.

I have recently had a few problems with my Python installation and as a result I have just reinstalled python and am trying to get all my addons working correctly as well. I’m going to look at virtualenv after to see if I can prevent this from happening again.

当我在终端中键入which python时,我现在得到

When I type which python into terminal I now get

/Library/Frameworks/Python.framework/Versions/2.7/bin/python

我知道这是正确的位置,现在也想正确安装其余所有插件.

I understand this to be the correct location and now want to get all the rest of my addons installed correctly as well.

但是,通过sudo easy_install pip安装pip并输入which pip后,我得到了

However after installing pip via sudo easy_install pip and type which pip i get

/usr/local/bin/pip

这是正确的吗?我本以为它应该反映以下内容

Is this correct? I would have thought it should reflect the below

/Library/Python/2.7/site-packages/

这里有一个名为pip-1.4-py2.7.egg的文件夹,该文件夹在灌输之前不存在,但是上述路径没有给我任何信心.

There is a folder in here called pip-1.4-py2.7.egg which was not there prior to instillation but the above path does not give me any confidence.

如果要正确设置pip以及我的其他插件(如Distribute,Flask和Boto)应安装在哪里?

Where should pip and my other addons such as Distribute, Flask and Boto be installed if I want to set this up correctly?

Mac OSX 10.7,Python 2.7

Mac OSX 10.7, Python 2.7

推荐答案

由于pip是可执行文件,而which返回环境中可执行文件或文件名的路径.它是正确的. Pip模块安装在站点程序包中,而可执行文件安装在bin中.

Since pip is an executable and which returns path of executables or filenames in environment. It is correct. Pip module is installed in site-packages but the executable is installed in bin.

这篇关于Python:PIP安装路径,此插件和其他插件的正确位置是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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