仮想環境にApache + Mod_wsgiを使用してDjango Inventoryをデプロイしようとしています。しかし、それはPILをインポートすることができないと主張しているサーバーのサイドエラー500を与えます。しかし、PILとPhotologueはすでにvirtualenv内にインストールされています。そして、私はこのセットアップの中で世界的なプロジェクトを動かすことに何の問題もありませんでした。Apache + Mod_wsgiでデプロイする際にPhotologueがdjango_inventoryにPython Imaging Libraryエラーをインポートできませんでした
FYI:Django Inventoryは、pipと一緒にインストールするとアプリとしてインストールされます。また、仮想環境のサイトパッケージに常駐しています。しかし、私はsteパッケージからそれをコピーして、/ var/www/htmlのルートに置いて、Apacheから提供しています。これが理由だろうか?
ありがとうございます。約6歳 -
[Tue Jun 21 10:50:24.308075 2016] [wsgi:error] [pid 19197] [remote ::1:224] File "/var/www/html/imsenv/lib/python2.7/site-packages/django_inventory/apps/photos/models.py", line 6, in <module>
[Tue Jun 21 10:50:24.308099 2016] [wsgi:error] [pid 19197] [remote ::1:224] from photologue.models import ImageModel
[Tue Jun 21 10:50:24.308108 2016] [wsgi:error] [pid 19197] [remote ::1:224] File "/var/www/html/imsenv/lib/python2.7/site-packages/photologue/models.py", line 33, in <module>
[Tue Jun 21 10:50:24.308131 2016] [wsgi:error] [pid 19197] [remote ::1:224] raise ImportError('Photologue was unable to import the Python Imaging Library. Please confirm it`s installed and available on your current Python path.')
[Tue Jun 21 10:50:24.308170 2016] [wsgi:error] [pid 19197] [remote ::1:224] ImportError: Photologue was unable to import the Python Imaging Library. Please confirm it`s installed and available on your current Python path.
PythonパスでPILが参照されているかどうかを確認します。 PILの代わりに枕を使用することも検討してください。 – user937284
@Ёжикええ、私はすでに枕をインストールしました(これは実際にPILをもたらします)。しかし、PILが私のPythonパスに含まれているかどうかをチェックするのはどうですか?私はすでにシェルからインポートできると言っています。明確にしていただけますか? – edam