前提・実現したいこと
Pythonを勉強し始めて1か月程度の初心者です。他にプログラミング経験はありません。
PyAutoGUIライブラリをコマンドプロンプトにてインストールしようとしているのですが、うまくいきません。
会社でプロキシがあるので、プロキシがある状態でのインストール方法を調べて試しましたができず、
オフラインでもインストールしてみましたができませんでした。
エラー等を見る限りPyAutoGUIをインストールする場合はオンラインが必要な感じがします。
どうしたらインストールできますか?
プロキシのセットや書き方が何か間違っているのでしょうか?
ご教示よろしくお願いいたします。
発生している問題・エラーメッセージ
⓵ C:\Users******>py -m pip install pyautogui --proxy http://[ID]:[PASS]@proxy2.*********:8080 Collecting pyautogui 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: self signed certificate in certificate chain (_ssl.c:1108)'))': /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: self signed certificate in certificate chain (_ssl.c:1108)'))': /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: self signed certificate in certificate chain (_ssl.c:1108)'))': /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: self signed certificate in certificate chain (_ssl.c:1108)'))': /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: self signed certificate in certificate chain (_ssl.c:1108)'))': /simple/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: self signed certificate in certificate chain (_ssl.c:1108)'))) - skipping ERROR: Could not find a version that satisfies the requirement pyautogui (from versions: none) ERROR: No matching distribution found for pyautogui Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1108)'))) - skippingSSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1108)'))) - skipping ⓶ C:\Users******>set HTTP_PROXY=http://[ID]:[PASS]@proxy2.*********:8080 C:\Users******>py -m pip install pyautogui Collecting pyautogui WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x042E98B0>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/pyautogui/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x042E99D0>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/pyautogui/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x042E9B80>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/pyautogui/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x042E9328>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/pyautogui/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0432A040>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/pyautogui/ ERROR: Could not find a version that satisfies the requirement pyautogui (from versions: none) ERROR: No matching distribution found for pyautogui ⓷ C:\Users******>cd Documents C:\Users******\Documents>py -m pip install --no-index --find-links=pyautogui_src pyautogui Looking in links: pyautogui_src Collecting pyautogui Collecting pymsgbox (from pyautogui) Installing build dependencies ... error ERROR: Command errored out with exit status 1: command: 'C:\Users******\AppData\Local\Programs\Python\Python38-32\python.exe' 'C:\Users******\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users******\AppData\Local\Temp\pip-build-env-sxmby76v\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: --no-index --find-links pyautogui_src -- 'setuptools>=40.8.0' wheel cwd: None Complete output (4 lines): Looking in links: pyautogui_src Collecting setuptools>=40.8.0 ERROR: Could not find a version that satisfies the requirement setuptools>=40.8.0 (from versions: none) ERROR: No matching distribution found for setuptools>=40.8.0 ---------------------------------------- ERROR: Command errored out with exit status 1: 'C:\Users******\AppData\Local\Programs\Python\Python38-32\python.exe' 'C:\Users******\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users******\AppData\Local\Temp\pip-build-env-sxmby76v\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: --no-index --find-links pyautogui_src -- 'setuptools>=40.8.0' wheel Check the logs for full command output. ⓸ C:\Users******\Documents>py -m pip install pyautogui_src Collecting pyautogui_src WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x04429838>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/pyautogui-src/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x04429460>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/pyautogui-src/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x04429B98>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/pyautogui-src/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x04429628>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/pyautogui-src/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x04429AA8>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/pyautogui-src/ ERROR: Could not find a version that satisfies the requirement pyautogui_src (from versions: none) ERROR: No matching distribution found for pyautogui_src ⓹ C:\Users******>cd Documents\pyautogui_src C:\Users******\Documents\pyautogui_src>py -m pip install PyAutoGUI-0.9.50.tar.gz Processing c:\users******\documents\pyautogui_src\pyautogui-0.9.50.tar.gz Collecting pymsgbox (from PyAutoGUI==0.9.50) WARNING: --------字数制限の為短縮 ⓸と同一エラー繰り返し-------- ERROR: Could not find a version that satisfies the requirement pymsgbox (from PyAutoGUI==0.9.50) (from versions: none) ERROR: No matching distribution found for pymsgbox (from PyAutoGUI==0.9.50)
該当のソースコード
Python
1⓵ 2py -m pip install pyautogui --proxy http://[ID]:[PASS]@proxy2.*********:8080 3 4⓶ 5set HTTP_PROXY=http://[ID]:[PASS]@proxy2.*********:8080 6py -m pip install pyautogui 7 8⓷ 9C:\Users******>cd Documents 10C:\Users******\Documents>py -m pip install --no-index --find-links=pyautogui_src pyautogui 11 12⓸ 13C:\Users******\Documents>py -m pip install pyautogui_src 14 15⓹ 16C:\Users******>cd Documents\pyautogui_src 17C:\Users******\Documents\pyautogui_src>py -m pip install PyAutoGUI-0.9.50.tar.gz
試したこと
以上のようにいろいろ試していますがインストールできておりません。
プロキシはPACを開いて一番下の行にあった複数(proxy2,3,4)を試しましたができませんでした。
⓷~⓹のように、オフラインでインストールしてもエラーが出ます。
パッケージの中を1つ1つオフラインでインストールした場合(⓹)、
PyAutoGUIとPyMsgBoxだけインストールできませんでした。
補足情報(FW/ツールのバージョンなど)
Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 22:45:29) [MSC v.1916 32 bit (Intel)] on win32
Package Version
et-xmlfile 1.0.1
jdcal 1.4.1
MouseInfo 0.1.3
openpyxl 3.0.3
Pillow 7.1.2
pip 19.2.3
PyGetWindow 0.0.8
pyperclip 1.8.0
PyRect 0.1.4
PyScreeze 0.1.26
PyTweening 1.0.3
selenium 3.141.0
setuptools 41.2.0
urllib3 1.25.9
今までインストールした物はとりあえずオフラインで入れています。
回答1件
あなたの回答
tips
プレビュー