質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.47%
PyAutoGUI

PyAutoGUIは、Windows、Mac OS、Linuxに対応した、Python用のGUI自動化ライブラリです。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

Q&A

解決済

1回答

164閲覧

PyAutoGUIがインストールできない

syoshinsya12

総合スコア1

PyAutoGUI

PyAutoGUIは、Windows、Mac OS、Linuxに対応した、Python用のGUI自動化ライブラリです。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

1グッド

0クリップ

投稿2024/04/27 06:56

実現したいこと

・Python 3.12にPyAutoGUI-0.9.54のライブラリをインストールしたいです。
・会社のPCを使用するため、pip install pyautoguiではSSLエラーとなってしまいました。
そのため、pypiからダウンロードしたPyAutoGUI-0.9.54.tar.gzをインストールしたいです。

発生している問題・分からないこと

「lib」フォルダ内に「PyAutoGUI-0.9.54.tar.gz」を保存し、コマンドプロンプトから下記を実行しました。
【実行した内容】
py -m pip install --no-index --find-links=lib pyautogui
【結果】
C:\Users\ZZZZZ>py -m pip install --no-index --find-links=lib pyautogui
Looking in links: lib
Processing c:\users\ZZZZZ\lib\pyautogui-0.9.54.tar.gz
Installing build dependencies ... error
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [47 lines of output]
Looking in links: lib
Processing c:\users\ZZZZZ\lib\setuptools-69.5.1.tar.gz
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Installing backend dependencies: started
Installing backend dependencies: finished with status 'error'
error: subprocess-exited-with-error

pip subprocess to install backend dependencies did not run successfully. exit code: 1 [24 lines of output] Looking in links: lib Processing c:\users\ZZZZZ\lib\wheel-0.43.0.tar.gz Installing build dependencies: started Installing build dependencies: finished with status 'error' error: subprocess-exited-with-error pip subprocess to install build dependencies did not run successfully. exit code: 1 [3 lines of output] Looking in links: lib ERROR: Could not find a version that satisfies the requirement flit_core<4,>=3.8 (from versions: none) ERROR: No matching distribution found for flit_core<4,>=3.8 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error pip subprocess to install build dependencies did not run successfully. exit code: 1 See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error pip subprocess to install backend dependencies did not run successfully. exit code: 1 See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

該当のソースコード

C:\Users\ZZZZZ>py -m pip install --no-index --find-links=lib pyautogui Looking in links: lib Processing c:\users\ZZZZZ\lib\pyautogui-0.9.54.tar.gz Installing build dependencies ... error error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> [47 lines of output] Looking in links: lib Processing c:\users\ZZZZZ\lib\setuptools-69.5.1.tar.gz Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Installing backend dependencies: started Installing backend dependencies: finished with status 'error' error: subprocess-exited-with-error pip subprocess to install backend dependencies did not run successfully. exit code: 1 [24 lines of output] Looking in links: lib Processing c:\users\ZZZZZ\lib\wheel-0.43.0.tar.gz Installing build dependencies: started Installing build dependencies: finished with status 'error' error: subprocess-exited-with-error pip subprocess to install build dependencies did not run successfully. exit code: 1 [3 lines of output] Looking in links: lib ERROR: Could not find a version that satisfies the requirement flit_core<4,>=3.8 (from versions: none) ERROR: No matching distribution found for flit_core<4,>=3.8 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error pip subprocess to install build dependencies did not run successfully. exit code: 1 See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error pip subprocess to install backend dependencies did not run successfully. exit code: 1 See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip.

試したこと・調べたこと

  • teratailやGoogle等で検索した
  • ソースコードを自分なりに変更した
  • 知人に聞いた
  • その他
上記の詳細・結果

・「setuptools」と「wheel」が足りないのではとの記事を見て、同一の「lib」フォルダ内にsetuptools-69.5.1.tar.gzとwheel-0.43.0.tar.gzを追加。
→結果変わらず。

・「dependencies」のエラーかとも思えたので、「dependencies-7.7.0.tar.gz」も上記同様にlibフォルダ内に追加。
→結果変わらず

補足

・Anaconda環境で同様の現象にてうまくいかず断念。Anacondaをアンインストールし、Python 3.12をインストールして実行した結果です。解決方法教えていただければ幸いです。
・libフォルダはc:\users\ZZZZZ\libにて作成。c:\users\ZZZZZ\lib内にPyAutoGUI-0.9.54.tar.gz、setuptools-69.5.1.tar.gz、wheel-0.43.0.tar.gz、dependencies-7.7.0.tar.gzの4つのライブラリを保存。

melian👍を押しています

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

melian

2024/04/27 07:14

> 会社のPCを使用するため、pip install pyautoguiではSSLエラーとなってしまいました。 2018年なので多少古い話になりますが、以下の issue が上がっています。 i cannot install or upgrade pip "ssl error" · Issue #5448 · pypa/pip https://github.com/pypa/pip/issues/5448 「pypiからダウンロードしたPyAutoGUI-0.9.54.tar.gzをインストールしたい」とのことですが、pip コマンドに --trusted-host オプションを指定することでインストールすることができるかもしれません。 pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org pyautogui
syoshinsya12

2024/04/27 09:02

ご教示いただきありがとうございました。こちらの方法にてSSLで弾かれることなくインストールできました。 ローカルに落としたライブラリをいかにインストールするかを考えておりましたが、本質のSSLで弾かれるエラーの解消方法を教えていただき、今後のライブラリインストールにも必要活躍できそうです。ありがとうございました。
syoshinsya12

2024/04/27 09:03

ベストアンサーに選びたいので同じ内容を回答欄に投稿いただけますでしょうか?
guest

回答1

0

ベストアンサー

会社のPCを使用するため、pip install pyautoguiではSSLエラーとなってしまいました。

2018年なので多少古い話になりますが、以下の issue が上がっています。

i cannot install or upgrade pip "ssl error" · Issue #5448 · pypa/pip

このページで説明されている対処法として、pip コマンドに --trusted-host オプションを指定することでインストールすることができるかと思います。

python

1pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org pyautogui

投稿2024/04/27 09:06

melian

総合スコア19840

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

syoshinsya12

2024/04/27 09:48

回答ありがとうございます。 試したところ問題が解決しました! ベストアンサーに選ばせていただきました。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.47%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問