为什么没有枪炮的命令

问题描述 投票:0回答:4

我跑了这个:

pip3 install gunicorn

然后我试着跑枪,但我被告知没有这样的命令。如果我这样做:

ls -al /usr/local/lib/python3.7/site-packages/gunicorn/

我看到了这个:

.
..
app
arbiter.py
argparse_compat.py
_compat.py
config.py
debug.py
errors.py
glogging.py
http
__init__.py
instrument
pidfile.py
__pycache__
reloader.py
selectors.py
six.py
sock.py
systemd.py
util.py
workers

我以为我可以创建一个符号链接并将其存储在这里:

/usr/local/bin/

但我会链接什么?似乎没有真正的枪炮命令?

如果我看这里:

https://github.com/benoitc/gunicorn

没有名为“gunicorn”的文件。同样,如果我看这里:

https://github.com/benoitc/gunicorn/gunicorn

就像我所看到的那样,没有一个名为“gunicorn”的文件。那么我们如何从命令行调用它呢?

python python-3.x gunicorn
4个回答
2
投票

你可以用两种方式安装gunicorn,

如果你想安装操作系统级别,请尝试使用ubuntu sudo apt install gunicorn或pip style pip install gunicorn - 这是可以建议的

要检查是否已安装,请尝试以下命令

$ pip show gunicorn
Name: gunicorn
Version: 19.9.0
Summary: WSGI HTTP Server for UNIX
Home-page: http://gunicorn.org
Author: Benoit Chesneau
Author-email: [email protected]
License: MIT
Location: /home/<user>/anaconda3/lib/python3.6/site-packages
Requires: 
Required-by:

让我知道如果我对你的问题的理解是正确的。


1
投票

如果您正在使用virtualenv,那么gunicorn就是创建的

/ path_to_your_env /斌/ gunicorn

所以每当你尝试使用gunicorn时,你需要先加载virtualenv,然后执行gunicorn命令。


0
投票

你需要pip install gunicorn


-1
投票

你应该用

export PATH=${PATH}:/usr/local/python3/bin
© www.soinside.com 2019 - 2024. All rights reserved.