1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Django / Apache / mod_wsgi: No module named importlib

Last updated at Posted at 2015-01-08

自分メモ。

importlibがないという言葉にしたがってpip install


$ sudo pip install importlib
Requirement already satisfied (use --upgrade to upgrade): importlib in /usr/local/lib/python2.7/site-packages
Cleaning up...

あるって言われる。
stackoverflowをさまよっているといくつか情報を発見。
どうやらpython-pathにsite-packagesが入ってないときにでてくるエラーらしい。
単純にパスが通ってないだけだった・・・。

ということでvirtualhost-example.com.confを編集。


<VirtualHost *:80&lg;
    #site-packagesとwsgi.pyにパスを通す
    WSGIDaemonProcess example.com python-path=/your/python/site-packages:/home/user/example.com
</VirtualHost&lg;

$ sudo apachectl graceful

無事動作。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?