【问题标题】:Couldn't install pip and selenium in windows7无法在 windows7 中安装 pip 和 selenium
【发布时间】:2013-01-04 20:33:03
【问题描述】:

我正在使用 python 2.7。我已下载文件 selenium-2.28.0 并解压缩到 C:\Python27 。然后运行命令python setup.py install,但出现错误。我正在使用 32 位 Windows 7 电脑

C:\Users>cd..

C:\>cd C:\Python27\selenium-2.28.0

C:\Python27\selenium-2.28.0>python setup.py install
'python' is not recognized as an internal or external command,
operable program or batch file.

C:\Python27\selenium-2.28.0>setup.py install
Traceback (most recent call last):
  File "C:\Python27\selenium-2.28.0\setup.py", line 17, in <module>
    from setuptools import setup
ImportError: No module named setuptools

C:\Python27\selenium-2.28.0>

可能是什么原因?解压缩文件 pip-1.2.1 到与 selenium 相同的文件夹也是如此。

你能在这里指导我吗?

编辑

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Arup Rakshit>cd..

C:\Users>cd..

C:\>cd C:\Python27\selenium-2.28.0>
The syntax of the command is incorrect.

C:\>C:\Python27\selenium-2.28.0
'C:\Python27\selenium-2.28.0' is not recognized as an internal or external comma
nd,
operable program or batch file.

C:\>cd C:\Python27\selenium-2.28.0

C:\Python27\selenium-2.28.0>c:\python27\python.exe setup.py install
Traceback (most recent call last):
  File "setup.py", line 17, in <module>
    from setuptools import setup
ImportError: No module named setuptools

C:\Python27\selenium-2.28.0>

【问题讨论】:

  • 请帮我安装。
  • @Ross Patterson 你能帮帮我吗?
  • 尝试 C:\Python27\selenium-2.28.0>c:\python27\python.exe setup.py 安装
  • 您的“PATH”中需要 python,所以当您在命令行中键入 python 时,它就会运行。这是一个开始。看这里。 stackoverflow.com/questions/6318156/…
  • @PaulC 看到我的 EDIT 不起作用!请帮忙

标签: python python-2.7 pip


【解决方案1】:

最后我通过easy_installer解决了我的问题。我已经用 python2.7 安装了所有需要的包。

这是 Youtube 链接easy_installer

希望这对其他人也有帮助!

【讨论】:

    猜你喜欢
    • 2019-01-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-11-01
    • 1970-01-01
    • 1970-01-01
    • 2020-05-01
    • 2020-10-12
    相关资源
    最近更新 更多