Проблема при установке селена - PullRequest
0 голосов
/ 03 апреля 2020

Моя системная конфигурация:

ОС: Windows10 Python установлена ​​с Anaconda.

Когда я пытаюсь установить "Selenium" с помощью pip с помощью команды pip install selenium. Выдает следующую ошибку:

D:\>pip install selenium
WARNING: pip is configured with locations that require TLS/SSL, however the ssl
module in Python is not available.

Collecting selenium



    WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, stat
    us=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/selenium/

    WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, stat
    us=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/selenium/
      WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, stat
    us=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL becau
    se the SSL module is not available.")': /simple/selenium/
      WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, stat
    us=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL becau
    se the SSL module is not available.")': /simple/selenium/
      WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, stat
    us=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL becau
    se the SSL module is not available.")': /simple/selenium/
      Could not fetch URL https://pypi.org/simple/selenium/: There was a problem con
    firming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max
     retries exceeded with url: /simple/selenium/ (Caused by SSLError("Can't connect
     to HTTPS URL because the SSL module is not available.")) - skipping
      ERROR: Could not find a version that satisfies the requirement selenium (from
    versions: none)
    ERROR: No matching distribution found for selenium
    WARNING: pip is configured with locations that require TLS/SSL, however the ssl
    module in Python is not available.

    Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming
    the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retrie
    s exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS UR
    L because the SSL module is not available.")) - skipping

1 Ответ

0 голосов
/ 04 апреля 2020

Вы попробуете с Anaconda Prompt .

Вы увидите (базовый), теперь обновите пункт. Пример:

Python код:

(base) C:\Users\Tom>cd ..
(base) C:\Users>cd ..
(base) C:\>python -m pip install --upgrade pip
Requirement already up-to-date: pip in g:\anaconda3\lib\site-packages (20.0.2)
(base) C:\>pip -V
pip 20.0.2 from G:\Anaconda3\lib\site-packages\pip (python 3.7)
# Try install
(base) C:\>pip install selenium

Это займет больше времени, но также установит или обновит библиотеки SSL, которые Anaconda использует внутри.

Python код:

(base) C:\>conda update condo
......
pyopenssl-19.1.0     | 47 KB     | #################################### | 100%
openssl-1.1.1f       | 4.7 MB    | #################################### | 100%

Источник

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...