简体   繁体   English

如何使用/安装pip

[英]How to use/install pip

Noob question here on Python using pip. Noob在这里使用pip在Python上提问。 I've installed pip using setuptools on a Win7 32-bit machine. 我在Win7 32位机器上使用setuptools安装了pip。 I am not using virtualenv. 我没有使用virtualenv。

Now trying to install enum34 for use with dbf; 现在尝试安装enum34以与dbf一起使用; I need enum34 as I have to work in Python 2.7 for use with ArcGIS 10.2. 我需要enum34,因为我必须使用Python 2.7才能与ArcGIS 10.2一起使用。 In PowerShell, I get the following returned no matter what command I try to use with pip, including the command 'list'. 在PowerShell中,无论我尝试使用什么命令使用pip,我都会得到以下内容,包括命令'list'。 I've also tried with the Windows basic Command Prompt and got the same results. 我也试过Windows基本命令提示符并得到相同的结果。

Did pip not install correctly? 点不能正确安装吗? Is there some other error? 还有其他错误吗?

Please let me know if I've included enough information. 如果我已经提供了足够的信息,请告诉我。

PS C:\python27\arcgis10.2\scripts> .\pip install enum34

Traceback (most recent call last): Traceback(最近一次调用最后一次):

 File "C:\python27\arcgis10.2\scripts\pip-script.PY", line 9, in <module>
  1oad_entry_point('pip==l.5.6', 'console_scripts', 'pip')()

 File "build\bdist.win32\egg\pkg_resources.py", line 351, in load_entry_point

 Fi1e "build\bdist.win32\egg\pkg_resources.py", line 2363: in load_entry_point

 File "build\bdist.win32\egg\pkg_resources.py", line 2088, in load
  )

 File "C:\Python27\ArcGIS10.2\lib\site-packages\pip\__init__.py", line 10, in <module>
  from pip.util import get_installed_distributions, get_prog

....etc. ....等等。

Download get-pip.py and run it as Administrator. 下载get-pip.py并以管理员get-pip.py运行它。 Pip should then be on your path, so you can just use pip install enum34 instead of .\\pip install enum34 . Pip应该在你的路径上,所以你可以使用pip install enum34代替.\\pip install enum34 If that doesn't work, tell us the error message you get. 如果这不起作用,请告诉我们您收到的错误消息。

My goto solution for python libraries on windows is 我在Windows上的python库的goto解决方案是

http://www.lfd.uci.edu/~gohlke/pythonlibs/ http://www.lfd.uci.edu/~gohlke/pythonlibs/

They have prebuilt binary installers for tons of projects. 他们有大量项目的预建二进制安装程序。 enum34 is available. enum34可用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM