- 云托管部署fastapi服务失败,pip 安装报错?
FROM tiangolo/uvicorn-gunicorn:python3.11 COPY . /app # 设定当前的工作目录 WORKDIR /app # 安装依赖到指定的/install文件夹 # 选用国内镜像源以提高下载速度 RUN pip config set global.index-url http://mirrors.cloud.tencent.com/pypi/simple \ && pip config set global.trusted-host mirrors.cloud.tencent.com \ && pip install --upgrade pip \ # pip install scipy 等数学包失败,可使用 apk add py3-scipy 进行, 参考安装 https://pkgs.alpinelinux.org/packages?name=py3-scipy&branch=v3.13 && pip install --user -r requirements.txt # 暴露端口。 # 此处端口必须与「服务设置」-「流水线」以及「手动上传代码包」部署时填写的端口一致,否则会部署失败。 EXPOSE 80 如上是我的dockfile配置,东抄西抄,我也是服了,就没个正经的教程。 然后运行到pip install 就报错了。 [2023-06-25 12:37:53] Downloading http://mirrors.cloud.tencent.com/pypi/packages/04/af/1749185fe149662b1f0af3bea74ab0620294752366306cd6098fdb52eafa/fastapi-0.97.0-py3-none-any.whl (56 kB) [2023-06-25 12:37:53] ERROR: Exception: [2023-06-25 12:37:53] Traceback (most recent call last): [2023-06-25 12:37:53] File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/base_command.py", line 169, in exc_logging_wrapper 。。。。 [2023-06-25 12:37:53] File "/usr/local/lib/python3.11/threading.py", line 957, in start [2023-06-25 12:37:53] _start_new_thread(self._bootstrap, ()) [2023-06-25 12:37:53] RuntimeError: can't start new thread [2023-06-25 12:37:54] The command '/bin/sh -c pip config set global.index-url http://mirrors.cloud.tencent.com/pypi/simple && pip config set global.trusted-host mirrors.cloud.tencent.com && pip install --upgrade pip && pip install --user -r requirements.txt' returned a non-zero code: 2 救救孩子吧,我都快疯了
2023-06-25 - 小程序后台调用session_key接口报错
HTTPSConnectionPool(host='api.weixin.qq.com', port=443): Max retries exceeded with url: /sns/jscode2session?appid=***&secret=***&js_code=***&grant_type=authorization_code (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) 测试环境能正常调用,线上环境就会报错。有解决办法么
2017-11-24