我正在构建一个 dockerfiledocker build .
命令。在构建时,我遇到以下错误:
Downloading/unpacking requests
Cannot fetch index base URL http://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement requests
No distributions at all found for requests
这是泊坞窗文件:
FROM jonasbonno/rpi-grovepi
RUN pip install requests
RUN git clone https://github.com/keyban/fogservice.git #update
ENTRYPOINT ["python"]
CMD ["fogservice/service.py"]
可能是什么问题?
你有pip问题,不是docker问题,你需要添加pip install --index-url https://pypi.python.org/simple/ --upgrade pip
到你的泊坞窗文件:
FROM jonasbonno/rpi-grovepi
RUN pip install --index-url https://pypi.python.org/simple/ --upgrade pip
RUN hash -r
RUN pip install requests
RUN git clone https://github.com/keyban/fogservice.git #update
ENTRYPOINT ["python"]
CMD ["fogservice/service.py"]
您可以在这里找到解决方案:pip 连接失败:无法获取索引基 URL http://pypi.python.org/simple/ https://stackoverflow.com/questions/21294997/pip-connection-failure-cannot-fetch-index-base-url-http-pypi-python-org-simpl
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)