In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to deal with the problem that pip uses private sources to install dependencies in docker and still requests external sources. I believe most people don't know much about it, so share this article for your reference. I hope you will gain a lot after reading this article. Let's learn about it together.
Recently, we are carrying out application containerization, and we need to build an application image based on python2.7.12. Pip.conf is configured in docker to specify the use of a private network source, but it is still found that the installation of dependencies is not successful.
The exception message indicates that the connection to the official source failed. The message is as follows:
Collecting positional > = 1.0.1 (from python-keystoneclient==3.5.1- >-r / monitor/requirements.txt (line 7)) Downloading http://10.xx.xxx.xxx/repository/pypi-proxy/packages/positional/1.2.1/positional-1.2.1.tar.gz Complete output from command python setup.py egg_info: Download error on https://pypi.python.org/simple/pbr/: [Errno 99] Cannot assign requested address-- Some packages may not be found! Couldn't find index page for 'pbr' (maybe misspelled?) Download error on https://pypi.python.org/simple/: [Errno 99] Cannot assign requested address-- Some packages may not be found! No local packages or working download links found for pbr > = 1.8 Traceback (most recent call last):... Distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse ('pbr > = 1.8')
It roughly means that the dependency of pbr > = 1.8 needs to be installed when installing positional, but this dependency failed to be installed from the external network.
However, the private network source has been configured in pip.conf, and it is effective from the installation path of positional.
Later, after downloading the source code of positional, I found that there are pbr dependencies installed through setuptools in setup.py.
Setuptools.setup (setup_requires= ['pbr > = 1.8'], pbr=True)
After querying the source of setuptools and pip configuration, it is configured through the ~ / .pydistutils.cfg file.
By adding the file when mirroring, the problem of dependent installation is successfully solved.
The above is all the contents of this article entitled "how to deal with the problem of pip using private sources for dependent installation and still requesting external sources in docker". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.