ОШИБКА: не удалось найти версию, удовлетворяющую требованию pyautogui (из версий: нет)

#python #python-3.x #ssl #pyautogui

#python #python-3.x #ssl #pyautogui

Вопрос:

Я попытался импортировать свой модуль. Я поместил это в записную книжку Jupyter

 ! pip install pyautogui 
 

вывод

 could not fetch URL https://pypi.org/simple/pyautogui/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pyautogui/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)'))) - skipping




WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)'))': /simple/pyautogui/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)'))': /simple/pyautogui/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)'))': /simple/pyautogui/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)'))': /simple/pyautogui/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)'))': /simple/pyautogui/
ERROR: Could not find a version that satisfies the requirement pyautogui (from versions: none)
ERROR: No matching distribution found for pyautogui
 

как я могу избавиться от этой проблемы? Пожалуйста, помогите..

Ответ №1:

Если у вас есть как python2, так и python3, лучше всего использовать pip3, и иногда, даже если python2 не установлен, с pip могут возникать ошибки

Поэтому замените ! pip install pyautogui на ! pip3 install pyautogui и это должно работать