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

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

新規登録して質問してみよう
ただいま回答率
85.46%
Windows 10

Windows 10は、マイクロソフト社がリリースしたOSです。Modern UIを標準画面にした8.1から、10では再びデスクトップ主体に戻され、UIも変更されています。PCやスマホ、タブレットなど様々なデバイスに幅広く対応していることが特徴です。

Python

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

pip

pipとは、Pythonを用いて書かれているパッケージソフトのインストールや管理を行うためのパッケージマネジメントシステムです。pipを使う主なメリットは、コマンドラインインターフェースにて容易にPythonパッケージソフトをインストール可能だという点です。

Q&A

解決済

1回答

5491閲覧

Python3.8.5にてPillowパッケージをインストールできません

atsu6

総合スコア1

Windows 10

Windows 10は、マイクロソフト社がリリースしたOSです。Modern UIを標準画面にした8.1から、10では再びデスクトップ主体に戻され、UIも変更されています。PCやスマホ、タブレットなど様々なデバイスに幅広く対応していることが特徴です。

Python

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

pip

pipとは、Pythonを用いて書かれているパッケージソフトのインストールや管理を行うためのパッケージマネジメントシステムです。pipを使う主なメリットは、コマンドラインインターフェースにて容易にPythonパッケージソフトをインストール可能だという点です。

0グッド

0クリップ

投稿2021/03/26 08:47

編集2021/03/26 09:25

前提・実現したいこと

PythonでPillowというライブラリをインストールしたいです。

発生している問題・エラーメッセージ

pipコマンドにてPillowをインストールしようとしても下記エラーが出ます。

PS C:\Users\username> pip install Pillow WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))': /simple/pillow/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))': /simple/pillow/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))': /simple/pillow/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))': /simple/pillow/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))': /simple/pillow/ ERROR: Could not find a version that satisfies the requirement Pillow ERROR: No matching distribution found for Pillow

試したこと

下記コマンドを実行

python3 -m pip install --upgrade pip python3 -m pip install --upgrade Pillow

同じエラーが出ます。

管理者権限にてCMD実行

同じエラーが出ます。

-vをつけて実行

C:\WINDOWS\system32>pip install -v Pillow Using pip 21.0.1 from c:\python38\lib\site-packages\pip (python 3.8) Non-user install because site-packages writeable Created temporary directory: C:\Users\username\AppData\Local\Temp\pip-ephem-wheel-cache-hks29fcu Created temporary directory: C:\Users\username\AppData\Local\Temp\pip-req-tracker-7c3v3app Initialized build tracking at C:\Users\username\AppData\Local\Temp\pip-req-tracker-7c3v3app Created build tracker: C:\Users\username\AppData\Local\Temp\pip-req-tracker-7c3v3app Entered build tracker: C:\Users\username\AppData\Local\Temp\pip-req-tracker-7c3v3app Created temporary directory: C:\Users\username\AppData\Local\Temp\pip-install-d39skl80 1 location(s) to search for versions of pillow: * https://pypi.org/simple/pillow/ Fetching project page and analyzing links: https://pypi.org/simple/pillow/ Getting page https://pypi.org/simple/pillow/ Found index url https://pypi.org/simple Looking up "https://pypi.org/simple/pillow/" in the cache Request header has "max_age" as 0, cache bypassed Starting new HTTPS connection (1): pypi.org:443 Incremented Retry for (url='/simple/pillow/'): Retry(total=4, connect=None, read=None, redirect=None, status=None) Starting new HTTPS connection (2): pypi.org:443 Incremented Retry for (url='/simple/pillow/'): Retry(total=3, connect=None, read=None, redirect=None, status=None) Starting new HTTPS connection (3): pypi.org:443 Incremented Retry for (url='/simple/pillow/'): Retry(total=2, connect=None, read=None, redirect=None, status=None) Starting new HTTPS connection (4): pypi.org:443 Incremented Retry for (url='/simple/pillow/'): Retry(total=1, connect=None, read=None, redirect=None, status=None) Starting new HTTPS connection (5): pypi.org:443 Incremented Retry for (url='/simple/pillow/'): Retry(total=0, connect=None, read=None, redirect=None, status=None) Starting new HTTPS connection (6): pypi.org:443 Could not fetch URL https://pypi.org/simple/pillow/: connection error: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pillow/ (Caused by ProtocolError('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))) - skipping Given no hashes to check 0 links for project 'pillow': discarding no candidates Exception information: Traceback (most recent call last): File "c:\python38\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 171, in _merge_into_criterion crit = self.state.criteria[name] KeyError: 'pillow' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "c:\python38\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 318, in resolve name, crit = self._merge_into_criterion(r, parent=None) File "c:\python38\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 173, in _merge_into_criterion crit = Criterion.from_requirement(self._p, requirement, parent) File "c:\python38\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 83, in from_requirement raise RequirementsConflicted(criterion) pip._vendor.resolvelib.resolvers.RequirementsConflicted: Requirements conflict: SpecifierRequirement('Pillow') During handling of the above exception, another exception occurred: Traceback (most recent call last): File "c:\python38\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 121, in resolve self._result = resolver.resolve( File "c:\python38\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 453, in resolve state = resolution.resolve(requirements, max_rounds=max_rounds) File "c:\python38\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 320, in resolve raise ResolutionImpossible(e.criterion.information) pip._vendor.resolvelib.resolvers.ResolutionImpossible: [RequirementInformation(requirement=SpecifierRequirement('Pillow'), parent=None)] The above exception was the direct cause of the following exception: Traceback (most recent call last): File "c:\python38\lib\site-packages\pip\_internal\cli\base_command.py", line 189, in _main status = self.run(options, args) File "c:\python38\lib\site-packages\pip\_internal\cli\req_command.py", line 178, in wrapper return func(self, options, args) File "c:\python38\lib\site-packages\pip\_internal\commands\install.py", line 316, in run requirement_set = resolver.resolve( File "c:\python38\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 127, in resolve six.raise_from(error, e) File "<string>", line 3, in raise_from pip._internal.exceptions.DistributionNotFound: No matching distribution found for Pillow 1 location(s) to search for versions of pip: * https://pypi.org/simple/pip/ Fetching project page and analyzing links: https://pypi.org/simple/pip/ Getting page https://pypi.org/simple/pip/ Found index url https://pypi.org/simple Looking up "https://pypi.org/simple/pip/" in the cache Request header has "max_age" as 0, cache bypassed Starting new HTTPS connection (1): pypi.org:443 Could not fetch URL https://pypi.org/simple/pip/: connection error: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by ProtocolError('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))) - skipping Given no hashes to check 0 links for project 'pip': discarding no candidates Removed build tracker: 'C:\Users\username\AppData\Local\Temp\pip-req-tracker-7c3v3app'

上記エラーが出ます。

チェックしたこと

プロキシが設定されてないことを確認

Internet Explorer 11にて
[設定] > [インターネットオプション] > [接続]タブ > [LANの設定] > [プロキシ サーバー]
にチェックが打ってないことを確認

補足情報(FW/ツールのバージョンなど)

環境

OS : Windows 10 Pro
Python version : 3.8.5
pip version : 21.0.1

ご教示のほどよろしくお願いいたします。

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

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

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

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

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

ppaul

2021/03/26 09:29

ネットワーク環境の問題のようですね。自宅ですか、会社ですか?
atsu6

2021/03/26 09:41

はい、自宅です。
guest

回答1

0

ベストアンサー

ダウンロードに何かしらの問題があるようです。ですので、WHLを手動でDLしてインストールすればとりあえずPILはインストールできそうです。

WHLをダウンロードして
pip3 install whlファイルへのパス.whlで試していただけますか?

Windows64bitでPython3.8であれば、Pillow‑8.1.2‑cp38‑cp38‑win_amd64.whlをDLしてください。

投稿2021/03/26 09:21

退会済みユーザー

退会済みユーザー

総合スコア0

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

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

atsu6

2021/03/26 09:32

ご教示いただいた方法を行いpip listにてPillowが確認できました。 ありがとうございました。
退会済みユーザー

退会済みユーザー

2021/03/26 12:26

少し調べるとDocker関連でネットワーク経由でのpip installの不具合(?)がありました。PILのはありませんでしたが、もしDockerを使っている等の情報がありましたらコメントでも構いませんので後学のために頂ければと思います。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.46%

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

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

質問する

関連した質問