首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Gunicorn:执行步骤失败,没有生成这样的文件或目录

Gunicorn:执行步骤失败,没有生成这样的文件或目录
EN

Stack Overflow用户
提问于 2020-07-29 17:50:02
回答 1查看 4.1K关注 0票数 1

我在试着安排好我的美甲。以下是systemmd配置文件的配置文件:

代码语言:javascript
复制
# Unit section is used to specify metadata and dependencies
[Unit]
Description=DEMO

# only start once the network target has been reached
After=network.target



# Service section specify the user and group that we want the process to run under
[Service]
# www-data group assigned to facilitate easy communication with nginx
Group=www-data

# path to working directory
WorkingDirectory=/srv/demo/git

# path to virtual environment
Environment="PATH=/srv/demo/git/venv/bin"

ExecStart=/srv/demo/git/venv/bin/gunicorn --workers=5 --bind unix:git.sock --log-level=debug wsgi:app --timeout 3600
#--workers=5 --threads=2 --worker-class=gthread 



[Install]
WantedBy=multi-user.target
~                                                                                                       
~                                                                                                       
~    

而我的虚拟环境文件夹中确实包含了gunicorn:

但我仍然无法运行这个系统it文件说,它没有找到古尼科恩。没有这样的档案或目录:

我已经从我的虚拟env外部卸载了gunicorn。但是当我做了一次,它显示了我的道路是/usr/bin/gunicorn。当我放置这个路径时,它不会抛出相同的错误,只是简单地说没有找到apt_pkg和gunicorn模块,但没有找到目录错误。这是路径问题吗?如果是这样的话,我该如何解决呢?

EN

回答 1

Stack Overflow用户

发布于 2021-05-02 09:52:14

我希望下面的步骤将有助于解决这个问题.

步骤1: cd ~/myprojectdir步骤2:源myprojectenv/bin/激活步骤3:将其粘贴到‘ExecStart’值交换‘/etc/systemd/system/gunicorn.service’的路径部分,其中guicorn‘./ path“步骤5: systemctl守护进程-重新加载步骤6: systemctl重新启动gunicorn步骤7: systemctl状态

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63159600

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档