记录一次部署python项目遇到的问题

  1. 首先参考此文安装python
    https://editor.csdn.net/md/?articleId=117387782
  2. 安装mysqlclient 时报错
    https://www.jianshu.com/p/fdba49c2c03e
  3. 使用yum命令时清华源报错,可以再yum中增加新的源
  4. 参考方法1配置阿里云yum源
    https://www.cnblogs.com/yangp/p/8506264.html

https://juejin.cn/s/yum%20install%20%E6%8C%87%E5%AE%9A%E6%BA%90%E5%9C%B0%E5%9D%80

  1. Compile error: “g++: error trying to exec ‘cc1plus’: execvp: No such file or directory”

yum install gcc-c++

https://stackoverflow.com/questions/8878676/compile-error-g-error-trying-to-exec-cc1plus-execvp-no-such-file-or-dir

  1. geventlet 安装失败
    sudo yum install python-devel

sudo yum install libevent-devel

https://stackoverflow.com/questions/11094718/error-command-gcc-failed-with-exit-status-1-while-installing-eventlet

之后还是报错,报错类似如下

https://blog.51cto.com/mapengfei/7123734

pip版本太低了,本地是18.1执行 pip3 install --upgrade pip 更新到pip-20.x后重新安装就可以了

  1. pip 使用临时镜像源
    可以在使用pip的时候在后面加上-i参数,指定pip源

https://blog.csdn.net/xuezhangjun0121/article/details/81664260
查看pip 源
和换源
https://blog.csdn.net/qq_40891747/article/details/116592227

  1. nohup 执行命令

nohup /project/venv/bin/python /project/manage.py runserver 0.0.0.0:8001 1>/project/test.log 2>&1 &

但是不知道为啥没有成功输出日志

你可能感兴趣的:(python,linux,开发语言)