[英]Why does VSCode not detect venv if the venv folder is installed inside a subdirectory?
[英]Installed gunicorn but it is not in venv/bin folder
我是 gunicorn 的新手,并试图在 ubuntu 上部署 django 网站。 我用过:
pip3 install gunicorn
sudo apt-get install gunicorn
但是当我想填写这个文件时:
sudo nano /etc/systemd/system/gunicorn.service
我填写:
[Unit]
Description=gunicorn daemon
Requires=gunicorn.socket
After=network.target
[Service]
User=sammy
Group=www-data
WorkingDirectory=/home/sammy/myprojectdir
ExecStart=/home/sammy/myprojectdir/myprojectenv/bin/gunicorn \
--access-logfile - \
--workers 3 \
--bind unix:/run/gunicorn.sock \
myproject.wsgi:application
[Install]
WantedBy=multi-user.target
但是/bin
中没有 gunicorn 文件缺少什么?
通过使用此命令:
sudo journalctl -u gunicorn.socket
sudo systemctl status gunicorn
gunicorn.service:执行生成/home/tw/tw_git2/tw_git2/ninipayenv/bin/gunicorn 步骤失败:没有这样的文件或目录
可以通过删除以前的 venv 并创建一个新的来修复它,以确保使用的 pip3 在 venv 内。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.