Could not find a version that satisfies the requirement selenium; No matching distribution found for selenium while installing Selenium on Python3.6.5

Deadly 提交于 2020-02-15 18:24:19

问题


pip install selenium

throws error as:

Could not find a version that satisfies the requirement selenium;
No matching distribution found for selenium

Please guide as to how to proceed


回答1:


This error message...

Could not find a version that satisfies the requirement selenium;
No matching distribution found for selenium

...implies that the Python Client was unable to install the Selenium related modules.

Your main issue probhably with either with the pip version or the Python installation.

Solution

  • Uninstall the current Python installation.
  • As you are on Windows 7 professional OS use CCleaner tool to wipe off all the OS chores before the new installation of Python Client.
  • Download and install a fresh version of compatible Python 3.6.5 binary/executable.
  • Ensure you are using latest version of pip (latest version 18.0 is available now):

    C:\Users\username>python -m pip install --upgrade pip
    Collecting pip
      Downloading https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl (1.3MB)
        100% |¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦| 1.3MB 544kB/s
    Installing collected packages: pip
      Found existing installation: pip 10.0.1
        Uninstalling pip-10.0.1:
          Successfully uninstalled pip-10.0.1
    Successfully installed pip-18.0
    
  • Install latest version of Selenium:

    C:\Users\username>pip install selenium
    Collecting selenium
      Downloading https://files.pythonhosted.org/packages/b8/53/9cafbb616d20c7624ff31bcabd82e5cc9823206267664e68aa8acdde4629/selenium-3.14.0-py2.py3-none-any.whl (898kB)
        100% |¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦| 901kB 380kB/s
    Requirement not upgraded as not directly required: urllib3 in c:\python\lib\site-packages (from selenium) (1.22)
    Installing collected packages: selenium
      Found existing installation: selenium 3.12.0
        Uninstalling selenium-3.12.0:
          Successfully uninstalled selenium-3.12.0
    Successfully installed selenium-3.14.0      
    
  • Or:

    C:\Python35\Scripts\pip.exe install selenium
    


来源:https://stackoverflow.com/questions/53702565/could-not-find-a-version-that-satisfies-the-requirement-selenium-no-matching-di

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!