首先我的情况是两台生产服务器,都安装了conda环境,但是一台是可以通过pip下载东西(111),另一台不可以(222)。

两台服务器都需要使用到gunicorn插件。用111服务器下载了gunicorn,找到了

linux无网络状态下载gunicorn后报 -bash: gunicorn: command not found

将此目录下的gunicorn和gunicorn-20...复制到另一台222服务器相同目录

此时使用 gunicorn -h测试gunicorn使用可以使用时 -bash: gunicorn: command not found 会有错误

解决办法:

1:第一步排除111服务器conda是否设置环境变量

2:到111服务器如下目录

linux无网络状态下载gunicorn后报 -bash: gunicorn: command not found

创建与该目录下同样格式的文件(本人采用复制其他文件,然后改名为gunicorn)

然后打开222服务器相同目录找到gunicorn文件,打开复制文件内容,然后黏贴到111对的gunicorn文件内、保存(此目录下的文件我没进行复制没有成功,所以采用这个麻烦的操作流程)

然后111服务器的gunicorn就可以正常使用了

 

相关文章:

  • 2022-12-23
  • 2021-10-03
  • 2021-08-19
  • 2022-03-06
  • 2021-04-22
  • 2021-08-26
  • 2021-07-17
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-05
  • 2021-08-23
  • 2021-06-21
  • 2021-07-13
相关资源
相似解决方案