我正在尝试使用命令
启动应用程序uwsgi_python36 --chdir=/var/www/uap/uap/ --virtualenv=/var/www/virtenv/uap/ --uid=deploy --module=project.wsgi --master --http-socket=127.0.0.1:8028 --max-requests=2000 --vacuum
UWSGI的这种配置适用于其他项目中的uwsgi和python 3.4以及python 2.7。但我们开始更新到python 3.6并出现错误。这里回溯启动错误:
Traceback (most recent call last):
File "./project/wsgi.py", line 16, in <module>
application = get_wsgi_application()
File "/var/www/virtenv/uap/lib/python3.6/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
django.setup(set_prefix=False)
...
File "/var/www/virtenv/uap/lib/python3.6/site-packages/django_filters/__init__.py", line 4, in <module>
from .filterset import FilterSet
File "/var/www/virtenv/uap/lib/python3.6/site-packages/django_filters/filterset.py", line 13, in <module>
from .conf import settings
...
File "/var/www/virtenv/uap/lib/python3.6/site-packages/coreapi/auth.py", line 2, in <module>
from requests.auth import AuthBase, HTTPBasicAuth
File "/var/www/virtenv/uap/lib/python3.6/site-packages/requests/__init__.py", line 63, in <module>
from . import utils
File "/var/www/virtenv/uap/lib/python3.6/site-packages/requests/utils.py", line 42, in <module>
if platform.system() == 'Windows':
...
File "/usr/local/lib/python3.6/platform.py", line 755, in _syscmd_uname
f = os.popen('uname %s 2> %s' % (option, DEV_NULL))
File "/var/www/virtenv/uap/lib/python3.6/os.py", line 978, in popen
bufsize=buffering)
File "/usr/local/lib/python3.6/subprocess.py", line 707, in __init__
restore_signals, start_new_session)
File "/usr/local/lib/python3.6/subprocess.py", line 1260, in _execute_child
restore_signals, start_new_session, preexec_fn)
TypeError: fork_exec() argument 4 must be tuple, not list
unable to load app 0 (mountpoint='') (callable not found or import error)
我尝试执行platform.system()
并且它运行良好。
是否有人对此错误及其解决方法有所了解?