CentOS 7 gunicorn: command not found

it2023-05-07  81

CentOS中已经安装了python2.7.5, 但是由于不满足需求,需要再安装python3,安装了python3,也安装了 gunicorn之后,执行gunicorn,报错:gunicorn: command not found。 

执行命令:find / -name gunicorn

发现系统里是有gunicorn:

/usr/local/python3/bin/gunicorn /usr/local/python3/lib/python3.8/site-packages/gunicorn

【如果没有安装gunicorn ,可以先执行 pip install gunicorn 安装gunicorn 】 

通过全路径命令执行:/usr/local/python3/bin/gunicorn

 

将gunicorn所在的路径添加到PATH环境变量里: export PATH=$PATH:/usr/local/python3/bin

再执行gunicorn,如下:

最新回复(0)