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

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

新規登録して質問してみよう
ただいま回答率
85.48%
コマンドプロンプト

コマンドプロンプト(cmd.exe)はMicrosoftによって提供されているコマンドラインインタプリタです。OS/2・Windows CE・Windows NTで使用可能です。

Python

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

pip

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

Q&A

解決済

2回答

6769閲覧

python仮想環境にpillowがinstallできない。

torutakakura

総合スコア6

コマンドプロンプト

コマンドプロンプト(cmd.exe)はMicrosoftによって提供されているコマンドラインインタプリタです。OS/2・Windows CE・Windows NTで使用可能です。

Python

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

pip

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

0グッド

0クリップ

投稿2020/09/08 15:39

### 環境
python3.6.2

やりたいこと

python仮想環境作成に必要なパッケージをrequirment.txtに記載して
一括インストールしようとしました。
最初はwheelがインストールされていない的なことが書いてあったので
pipでインストールしました。
pillowとwheelの関係性がうまくいっていないのか
以下のようなエラーが出力されました。

(myenv) C:\takakura\django>pip3 install -r requirements.txt Requirement already satisfied: Django~=2.2.10 in c:\takakura\django\myenv\lib\site-packages (from -r requirements.txt (line 1)) (2.2.16) Collecting Pillow~=2.2.1 Using cached Pillow-2.2.2.zip (2.2 MB) Collecting django-widget-tweaks~=1.4.8 Using cached django_widget_tweaks-1.4.8-py2.py3-none-any.whl (11 kB) Collecting django-environ~=0.4.5 Using cached django_environ-0.4.5-py2.py3-none-any.whl (21 kB) Collecting gunicorn~=20.0.4 Using cached gunicorn-20.0.4-py2.py3-none-any.whl (77 kB) Requirement already satisfied: sqlparse>=0.2.2 in c:\takakura\django\myenv\lib\site-packages (from Django~=2.2.10->-r requirements.txt (line 1)) (0.3.1) Requirement already satisfied: pytz in c:\takakura\django\myenv\lib\site-packages (from Django~=2.2.10->-r requirements.txt (line 1)) (2020.1) Requirement already satisfied: setuptools>=3.0 in c:\takakura\django\myenv\lib\site-packages (from gunicorn~=20.0.4->-r requirements.txt (line 5)) (28.8.0) Building wheels for collected packages: Pillow Building wheel for Pillow (setup.py) ... error ERROR: Command errored out with exit status 1: command: 'c:\takakura\django\myenv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\PCUSER~1\AppData\Local\Temp\pip-install-6tkl5opl\pillow\setup.py'"'"'; __file__='"'"'C:\Users\PCUSER~1\AppData\Local\Temp\pip-install-6tkl5opl\pillow\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\PCUSER~1\AppData\Local\Temp\pip-wheel-eirtb_uo' cwd: C:\Users\PCUSER~1\AppData\Local\Temp\pip-install-6tkl5opl\pillow\ Complete output (100 lines): running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-3.6 creating build\lib.win-amd64-3.6\PIL copying PIL\ArgImagePlugin.py -> build\lib.win-amd64-3.6\PIL copying PIL\BdfFontFile.py -> build\lib.win-amd64-3.6\PIL copying PIL\BmpImagePlugin.py -> build\lib.win-amd64-3.6\PIL  <省略> copying PIL\_binary.py -> build\lib.win-amd64-3.6\PIL copying PIL\_util.py -> build\lib.win-amd64-3.6\PIL copying PIL\__init__.py -> build\lib.win-amd64-3.6\PIL running egg_info writing Pillow.egg-info\PKG-INFO writing dependency_links to Pillow.egg-info\dependency_links.txt writing top-level names to Pillow.egg-info\top_level.txt reading manifest file 'Pillow.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'Pillow.egg-info\SOURCES.txt' running build_ext building 'PIL._imaging' extension error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools ---------------------------------------- ERROR: Failed building wheel for Pillow Running setup.py clean for Pillow Failed to build Pillow Installing collected packages: Pillow, django-widget-tweaks, django-environ, gunicorn Running setup.py install for Pillow ... error ERROR: Command errored out with exit status 1: command: 'c:\takakura\django\myenv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\PCUSER~1\AppData\Local\Temp\pip-install-6tkl5opl\pillow\setup.py'"'"'; __file__='"'"'C:\Users\PCUSER~1\AppData\Local\Temp\pip-install-6tkl5opl\pillow\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\PCUSER~1\AppData\Local\Temp\pip-record-tarbkmez\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\takakura\django\myenv\include\site\python3.6\Pillow' cwd: C:\Users\PCUSER~1\AppData\Local\Temp\pip-install-6tkl5opl\pillow\ Complete output (100 lines): running install running build running build_py creating build creating build\lib.win-amd64-3.6 creating build\lib.win-amd64-3.6\PIL copying PIL\ArgImagePlugin.py -> build\lib.win-amd64-3.6\PIL copying PIL\BdfFontFile.py -> build\lib.win-amd64-3.6\PIL copying PIL\BmpImagePlugin.py -> build\lib.win-amd64-3.6\PIL copying PIL\BufrStubImagePlugin.py -> build\lib.win-amd64-3.6\PIL copying PIL\ContainerIO.py -> build\lib.win-amd64-3.6\PIL   <省略> copying PIL\__init__.py -> build\lib.win-amd64-3.6\PIL running egg_info writing Pillow.egg-info\PKG-INFO writing dependency_links to Pillow.egg-info\dependency_links.txt writing top-level names to Pillow.egg-info\top_level.txt reading manifest file 'Pillow.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'Pillow.egg-info\SOURCES.txt' running build_ext building 'PIL._imaging' extension error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools ---------------------------------------- ERROR: Command errored out with exit status 1: 'c:\takakura\django\myenv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\PCUSER~1\AppData\Local\Temp\pip-install-6tkl5opl\pillow\setup.py'"'"'; __file__='"'"'C:\Users\PCUSER~1\AppData\Local\Temp\pip-install-6tkl5opl\pillow\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\PCUSER~1\AppData\Local\Temp\pip-record-tarbkmez\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\takakura\django\myenv\include\site\python3.6\Pillow' Check the logs for full command output.

どなたか教えて頂きたいです。

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

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

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

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

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

guest

回答2

0

ベストアンサー

pillowが古すぎてPyhton3.6用のバイナリが配布されていません。
https://pypi.org/project/Pillow/2.2.2/#files

C言語のビルド環境を整えるスキルが必要です。

pillowのバージョンを上げるか、Pyhtonのバージョンを下げるかの方が現実的でしょう。
ただしpillow2.2.2でバイナリ配布されている一番上のPythonバージョン、3.4はすでにサポートが切れています。

投稿2020/09/09 01:47

編集2020/09/09 02:24
quickquip

総合スコア11038

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

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

0

試しに以下のコマンドを実行してキャッシュを無効にした状態でインストールしたらどうでしょうか?

pip install pillow --no-cache-dir

投稿2020/09/08 15:57

Supernove

総合スコア1154

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

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

torutakakura

2020/09/09 14:33

--no-cache-dir をつけて再度実施しましたが 以下のエラーが出力されました。 Collecting pillow==2.2.1 Downloading Pillow-2.2.1.zip (2.2 MB) |████████████████████████████████| 2.2 MB 3.2 MB/s Building wheels for collected packages: pillow Building wheel for pillow (setup.py) ... error pythonのバージョンを下げて再度実施してみます。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問