如何在 alpine linux docker 中使用 py-requests?

How to use py-requests in alpine linux docker?

我构建了一个 python 应用程序,它 运行 在其 docker 容器中愉快地运行,直到我添加了一些 http 调用。使用库 'requests.' 我做了一些研究和alpine linux 3.7 有一个名为 'py-requests' 的库。只是我似乎无法在我自己的系统上安装它,无法更改我的代码来使用它,并且在离开 [=16= 时抛出错误] 在我的代码中。 Py-pip 好像也不行。

我无法使用 pip install,因为我被公司防火墙阻止了。我将 --proxy mycompanyproxy.com:80 --trusted-host pypi.org --trusted-host files.pythonhosted.org 添加到我的 dockerfile 的 pip install 命令中,并且能够得到我需要的东西。感谢您的评论,对于含糊其词,我深表歉意,我是菜鸟:)