简体   繁体   中英

How to use py-requests in alpine linux docker?

I built a python app that ran happily in its docker container until I added some http calls.. Using the library 'requests.' I did some research and alpine linux 3.7 has a library called 'py-requests'.. Only I can't seem to install this on my own system, to change my code to use it, and errors are thrown just leaving 'import requests' in my code. Py-pip doesn't seem to work either.

I couldn't use pip install because I was blocked by a corporate firewall. I added --proxy mycompanyproxy.com:80 --trusted-host pypi.org --trusted-host files.pythonhosted.org to my dockerfile's pip install command and was able to get what I needed. Thanks for commenting, and sorry for the vagueness, I am a noob :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM