Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python EXEC生成gunicorn:部署Django项目时没有这样的文件或目录_Python_Django_Ubuntu_Deployment_Gunicorn - Fatal编程技术网

Python EXEC生成gunicorn:部署Django项目时没有这样的文件或目录

Python EXEC生成gunicorn:部署Django项目时没有这样的文件或目录,python,django,ubuntu,deployment,gunicorn,Python,Django,Ubuntu,Deployment,Gunicorn,我尝试使用nginx和gunicorn部署django项目。但是当我启动gunicorn时,我得到了一个错误 gunicorn.service:在步骤EXEC生成时失败 /home/project/projectenv/bin/gunicorn:没有这样的文件或目录 /etc/systemd/system/gunicorn.service [Unit] Description=gunicorn daemon After=network.target [Service] User=root Gr

我尝试使用
nginx
gunicorn
部署
django
项目。但是当我启动gunicorn时,我得到了一个错误

gunicorn.service:在步骤EXEC生成时失败 /home/project/projectenv/bin/gunicorn:没有这样的文件或目录

/etc/systemd/system/gunicorn.service

[Unit]
Description=gunicorn daemon
After=network.target

[Service]
User=root
Group=www-data
WorkingDirectory=/home/project/project/
ExecStart=/home/project/projectenv/bin/gunicorn --access-logfile - --error-logfile error.log --workers 2 --bind unix:/home/project/project.sock project.wsgi:application

[Install]
WantedBy=multi-user.target
ls/home/project/projectenv/bin/gunicorn
-没问题

项目结构

home
  oddsportal
    oddsportalenv
      bin
      ...
    oddsportal
      app
        ...
      oddsportal
        settings
        wsgi
        ...
      manage.py
      ...

好吧,我们知道如果它是根目录的话,这不是一个权限问题(顺便说一句,在prod中这可能不是一个好主意)。但我会检查该配置中引用的所有其他文件或目录是否存在。它可能只是给了您失败的命令,而不是缺少的文件名。运行
哪个gunicorn
。结果是否与
ExecStart
相同?