0
私のubuntuサーバーにはDjangoアプリケーションがあります。これまでは、Python 2.7を使用していました。サーバー上のdjangoアプリケーション:ApacheはPython 3.5ではなくPython 2.7で動作します
私のDjangoバージョンは1.11.6です。
これからはpython 3.5を使いたいと思います。私はsudo service apache2 restart
を実行したときしかし、私はエラーがpython 2.7
を含む取得:
[Mon Oct 23 12:40:53.500064 2017] [wsgi:error] [pid 28615] [client 194.42.16.145:23434] mod_wsgi (pid=28615): Target WSGI script '/home/zinonas/guardianangel/GuardianAngel/wsgi.py' cannot be loaded as Python module.
[Mon Oct 23 12:40:53.500102 2017] [wsgi:error] [pid 28615] [client 194.42.16.145:23434] mod_wsgi (pid=28615): Exception occurred processing WSGI script '/home/zinonas/guardianangel/GuardianAngel/wsgi.py'.
[Mon Oct 23 12:40:53.500125 2017] [wsgi:error] [pid 28615] [client 194.42.16.145:23434] Traceback (most recent call last):
[Mon Oct 23 12:40:53.500144 2017] [wsgi:error] [pid 28615] [client 194.42.16.145:23434] File "/home/zinonas/guardianangel/GuardianAngel/wsgi.py", line 15, in <module>
[Mon Oct 23 12:40:53.500203 2017] [wsgi:error] [pid 28615] [client 194.42.16.145:23434] application = get_wsgi_application()
[Mon Oct 23 12:40:53.500213 2017] [wsgi:error] [pid 28615] [client 194.42.16.145:23434] File "/usr/local/lib/python2.7/dist-packages/django/core/wsgi.py", line 13, in get_wsgi_application
[Mon Oct 23 12:40:53.500240 2017] [wsgi:error] [pid 28615] [client 194.42.16.145:23434] django.setup(set_prefix=False)
[Mon Oct 23 12:40:53.500250 2017] [wsgi:error] [pid 28615] [client 194.42.16.145:23434] File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 22, in setup
[Mon Oct 23 12:40:53.500281 2017] [wsgi:error] [pid 28615] [client 194.42.16.145:23434] configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
[Mon Oct 23 12:40:53.500308 2017] [wsgi:error] [pid 28615] [client 194.42.16.145:23434] File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 56, in __getattr__
[Mon Oct 23 12:40:53.500371 2017] [wsgi:error] [pid 28615] [client 194.42.16.145:23434] self._setup(name)
[Mon Oct 23 12:40:53.500381 2017] [wsgi:error] [pid 28615] [client 194.42.16.145:23434] File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 41, in _setup
[Mon Oct 23 12:40:53.500393 2017] [wsgi:error] [pid 28615] [client 194.42.16.145:23434] self._wrapped = Settings(settings_module)
[Mon Oct 23 12:40:53.500398 2017] [wsgi:error] [pid 28615] [client 194.42.16.145:23434] File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 110, in __init__
[Mon Oct 23 12:40:53.500406 2017] [wsgi:error] [pid 28615] [client 194.42.16.145:23434] mod = importlib.import_module(self.SETTINGS_MODULE)
[Mon Oct 23 12:40:53.500411 2017] [wsgi:error] [pid 28615] [client 194.42.16.145:23434] File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
[Mon Oct 23 12:40:53.500443 2017] [wsgi:error] [pid 28615] [client 194.42.16.145:23434] __import__(name)
[Mon Oct 23 12:40:53.500466 2017] [wsgi:error] [pid 28615] [client 194.42.16.145:23434] ImportError: No module named settings.mysql
あなたがこの問題を解決する方法の任意のアイデアを持っていますか?