当前位置:论坛首页 > Linux面板 > 求助

【待反馈】网站->python项目中添加flask项目报错

发表在 Linux面板2023-12-20 14:44 [复制链接] 2 765

面板、插件版本:

804
系统版本:

centos7.9
问题描述:

通过 网站 ->python项目 添加flask项目,指定了依赖文件requirements.txt,运行方式选择Gunicorn。保存后项目运行失败,查看模块只安装了 pip 和 setuptools,并且项目日志中提示‘/www/server/pyporject_evn/azyc_venv/bin/gunicorn’: No such file or directory。手动在目录执行pip3 install -r  报SSL错误
相关截图(日志、错误):

# /www/server/pyporject_evn/azyc_venv/bin/pip3 install --trusted-host mirrors.aliyun.com  -r requirements.txt
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Looking in indexes: https://mirrors.aliyun.com/pypi/simple
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /pypi/simple/alembic/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /pypi/simple/alembic/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /pypi/simple/alembic/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /pypi/simple/alembic/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /pypi/simple/alembic/
Could not fetch URL https://mirrors.aliyun.com/pypi/simple/alembic/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='mirrors.aliyun.com', port=443): Max retries exceeded with url: /pypi/simple/alembic/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement alembic==1.8.1 (from versions: none)
ERROR: No matching distribution found for alembic==1.8.1
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://mirrors.aliyun.com/pypi/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='mirrors.aliyun.com', port=443): Max retries exceeded with url: /pypi/simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping

使用道具 举报 只看该作者 回复
发表于 2023-12-20 15:17:44 | 显示全部楼层
您好,您的项目是开源的吗?是的话发下项目地址来,我这里部署下试试
使用道具 举报 回复 支持 反对
发表于 2023-12-21 16:52:17 | 显示全部楼层
大炮运维V587 发表于 2023-12-20 15:17
您好,您的项目是开源的吗?是的话发下项目地址来,我这里部署下试试

已经解决,YUM源的问题,源换成阿里云镜像,卸载并重新安装python和项目就可以正常运行了了。
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

企业版年付运维跟进群

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急问题处理

论坛响应时间:10分钟

问题处理方式:1对1处理(优先)

工作时间:白班:9:00 - 18:00

工作时间:晚班:18:00 - 24:00

立即付费处理
快速回复 返回顶部 返回列表