Hello.
Try run python3
[root@grafana-apatsev Nginx-builder]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
[root@grafana-apatsev Nginx-builder]# yum install -y python3-pip
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.reconn.ru
* extras: mirror.reconn.ru
* updates: mirror.reconn.ru
Resolving Dependencies
--> Running transaction check
---> Package python3-pip.noarch 0:9.0.3-5.el7 will be installed
--> Processing Dependency: python(abi) = 3.6 for package: python3-pip-9.0.3-5.el7.noarch
--> Processing Dependency: python3-setuptools for package: python3-pip-9.0.3-5.el7.noarch
--> Processing Dependency: /usr/bin/python3 for package: python3-pip-9.0.3-5.el7.noarch
--> Running transaction check
---> Package python3.x86_64 0:3.6.8-10.el7 will be installed
--> Processing Dependency: python3-libs(x86-64) = 3.6.8-10.el7 for package: python3-3.6.8-10.el7.x86_64
--> Processing Dependency: libpython3.6m.so.1.0()(64bit) for package: python3-3.6.8-10.el7.x86_64
---> Package python3-setuptools.noarch 0:39.2.0-10.el7 will be installed
--> Running transaction check
---> Package python3-libs.x86_64 0:3.6.8-10.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=================================================================================================================================================
Package Arch Version Repository Size
=================================================================================================================================================
Installing:
python3-pip noarch 9.0.3-5.el7 base 1.8 M
Installing for dependencies:
python3 x86_64 3.6.8-10.el7 base 69 k
python3-libs x86_64 3.6.8-10.el7 base 7.0 M
python3-setuptools noarch 39.2.0-10.el7 base 629 k
Transaction Summary
=================================================================================================================================================
Install 1 Package (+3 Dependent packages)
Total download size: 9.4 M
Installed size: 48 M
Downloading packages:
(1/4): python3-pip-9.0.3-5.el7.noarch.rpm | 1.8 MB 00:00:00
(2/4): python3-3.6.8-10.el7.x86_64.rpm | 69 kB 00:00:00
(3/4): python3-setuptools-39.2.0-10.el7.noarch.rpm | 629 kB 00:00:00
(4/4): python3-libs-3.6.8-10.el7.x86_64.rpm | 7.0 MB 00:00:05
-------------------------------------------------------------------------------------------------------------------------------------------------
Total 1.6 MB/s | 9.4 MB 00:00:05
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : python3-setuptools-39.2.0-10.el7.noarch 1/4
Installing : python3-pip-9.0.3-5.el7.noarch 2/4
Installing : python3-3.6.8-10.el7.x86_64 3/4
Installing : python3-libs-3.6.8-10.el7.x86_64 4/4
Verifying : python3-libs-3.6.8-10.el7.x86_64 1/4
Verifying : python3-setuptools-39.2.0-10.el7.noarch 2/4
Verifying : python3-3.6.8-10.el7.x86_64 3/4
Verifying : python3-pip-9.0.3-5.el7.noarch 4/4
Installed:
python3-pip.noarch 0:9.0.3-5.el7
Dependency Installed:
python3.x86_64 0:3.6.8-10.el7 python3-libs.x86_64 0:3.6.8-10.el7 python3-setuptools.noarch 0:39.2.0-10.el7
Complete!
[root@grafana-apatsev Nginx-builder]# pip3 install -r requirements.txt
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Collecting PyYAML==4.2b1 (from -r requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/bd/da/0a49c1a31c60634b93fd1376b3b7966c4f81f2da8263f389cad5b6bbd6e8/PyYAML-4.2b1.tar.gz (263kB)
100% |████████████████████████████████| 266kB 1.7MB/s
Collecting requests==2.20.0 (from -r requirements.txt (line 2))
Downloading https://files.pythonhosted.org/packages/f1/ca/10332a30cb25b627192b4ea272c351bce3ca1091e541245cccbace6051d8/requests-2.20.0-py2.py3-none-any.whl (60kB)
100% |████████████████████████████████| 61kB 9.7MB/s
Collecting GitPython==2.1.9 (from -r requirements.txt (line 3))
Downloading https://files.pythonhosted.org/packages/88/9c/b462dddb492204417f88d538b0931e87631f2a98afe89842929f4ed9ca5b/GitPython-2.1.9-py2.py3-none-any.whl (447kB)
100% |████████████████████████████████| 450kB 3.0MB/s
Collecting distro==1.3.0 (from -r requirements.txt (line 4))
Downloading https://files.pythonhosted.org/packages/f6/b1/ba5a96bccd3496241d8908164b9502a129156443cdd5acbdbf04a90b7a09/distro-1.3.0-py2.py3-none-any.whl
Collecting packaging==19.0 (from -r requirements.txt (line 5))
Downloading https://files.pythonhosted.org/packages/91/32/58bc30e646e55eab8b21abf89e353f59c0cc02c417e42929f4a9546e1b1d/packaging-19.0-py2.py3-none-any.whl
Collecting beautifulsoup4==4.7.1 (from -r requirements.txt (line 6))
Downloading https://files.pythonhosted.org/packages/1d/5d/3260694a59df0ec52f8b4883f5d23b130bc237602a1411fa670eae12351e/beautifulsoup4-4.7.1-py3-none-any.whl (94kB)
100% |████████████████████████████████| 102kB 11.5MB/s
Collecting chardet<3.1.0,>=3.0.2 (from requests==2.20.0->-r requirements.txt (line 2))
Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
100% |████████████████████████████████| 143kB 8.7MB/s
Collecting certifi>=2017.4.17 (from requests==2.20.0->-r requirements.txt (line 2))
Downloading https://files.pythonhosted.org/packages/18/b0/8146a4f8dd402f60744fa380bc73ca47303cccf8b9190fd16a827281eac2/certifi-2019.9.11-py2.py3-none-any.whl (154kB)
100% |████████████████████████████████| 163kB 2.1MB/s
Collecting idna<2.8,>=2.5 (from requests==2.20.0->-r requirements.txt (line 2))
Downloading https://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl (58kB)
100% |████████████████████████████████| 61kB 10.3MB/s
Collecting urllib3<1.25,>=1.21.1 (from requests==2.20.0->-r requirements.txt (line 2))
Downloading https://files.pythonhosted.org/packages/01/11/525b02e4acc0c747de8b6ccdab376331597c569c42ea66ab0a1dbd36eca2/urllib3-1.24.3-py2.py3-none-any.whl (118kB)
100% |████████████████████████████████| 122kB 9.7MB/s
Collecting gitdb2>=2.0.0 (from GitPython==2.1.9->-r requirements.txt (line 3))
Downloading https://files.pythonhosted.org/packages/03/6c/99296f89bad2ef85626e1df9f677acbee8885bb043ad82ad3ed4746d2325/gitdb2-2.0.6-py2.py3-none-any.whl (63kB)
100% |████████████████████████████████| 71kB 10.8MB/s
Collecting six (from packaging==19.0->-r requirements.txt (line 5))
Downloading https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting pyparsing>=2.0.2 (from packaging==19.0->-r requirements.txt (line 5))
Downloading https://files.pythonhosted.org/packages/11/fa/0160cd525c62d7abd076a070ff02b2b94de589f1a9789774f17d7c54058e/pyparsing-2.4.2-py2.py3-none-any.whl (65kB)
100% |████████████████████████████████| 71kB 10.8MB/s
Collecting soupsieve>=1.2 (from beautifulsoup4==4.7.1->-r requirements.txt (line 6))
Downloading https://files.pythonhosted.org/packages/5d/42/d821581cf568e9b7dfc5b415aa61952b0f5e3dede4f3cbd650e3a1082992/soupsieve-1.9.4-py2.py3-none-any.whl
Collecting smmap2>=2.0.0 (from gitdb2>=2.0.0->GitPython==2.1.9->-r requirements.txt (line 3))
Downloading https://files.pythonhosted.org/packages/55/d2/866d45e3a121ee15a1dc013824d58072fd5c7799c9c34d01378eb262ca8f/smmap2-2.0.5-py2.py3-none-any.whl
Installing collected packages: PyYAML, chardet, certifi, idna, urllib3, requests, smmap2, gitdb2, GitPython, distro, six, pyparsing, packaging, soupsieve, beautifulsoup4
Running setup.py install for PyYAML ... done
Successfully installed GitPython-2.1.9 PyYAML-4.2b1 beautifulsoup4-4.7.1 certifi-2019.9.11 chardet-3.0.4 distro-1.3.0 gitdb2-2.0.6 idna-2.7 packaging-19.0 pyparsing-2.4.2 requests-2.20.0 six-1.12.0 smmap2-2.0.5 soupsieve-1.9.4 urllib3-1.24.3
[root@grafana-apatsev Nginx-builder]# ./main.py build -f config.yaml
Traceback (most recent call last):
File "./main.py", line 6, in <module>
from src import downloader
File "/root/Nginx-builder/src/downloader.py", line 3, in <module>
from src import config
File "/root/Nginx-builder/src/config.py", line 9, in <module>
OS_VERSION = distro.lsb_release_attr('release')[0]
IndexError: string index out of range
[root@grafana-apatsev Nginx-builder]# mc
[root@grafana-apatsev Nginx-builder]# ./main.py build -f config.yaml -r 1
Traceback (most recent call last):
File "./main.py", line 6, in <module>
from src import downloader
File "/root/Nginx-builder/src/downloader.py", line 3, in <module>
from src import config
File "/root/Nginx-builder/src/config.py", line 9, in <module>
OS_VERSION = distro.lsb_release_attr('release')[0]
IndexError: string index out of range