Не удается установить pip в python3 .6 (или обновить пакет python36.x86_64) в CentOS 7 - PullRequest
0 голосов
/ 03 августа 2020

В настоящее время у меня есть python3 .6 и python3 .4 (оба из репозитория epel) на моем сервере CentOS 7 (CentOS Linux выпуск 7.6.1810 (Core)):

[***** ~]$ sudo yum list installed | grep python3
python3-other-rpm-macros.noarch 3-25.el7                       @epel
python3-rpm-macros.noarch       3-32.el7                       @base
python34.x86_64                 3.4.10-2.el7                   @epel
python34-devel.x86_64           3.4.10-2.el7                   @epel
python34-libs.x86_64            3.4.10-2.el7                   @epel
python34-pip.noarch             8.1.2-8.el7                    @epel
python34-setuptools.noarch      39.2.0-3.el7                   @epel
python36.x86_64                 3.6.6-5.el7                    @epel
python36-devel.x86_64           3.6.6-5.el7                    @epel
python36-libs.x86_64            3.6.6-5.el7                    @epel

Но python3 .6 не имеет pip, поэтому я пытаюсь обновить пакет yum 'python36.x86_64' и получаю следующую ошибку:

[***** ~]$ sudo yum update python36.x86_64
...
Dependencies Resolved

=======================================================================================================================================================
 Package                                    Arch                       Version                              Repository                            Size
=======================================================================================================================================================
Installing:
 python3                                    x86_64                     3.6.8-13.el7                         base                                  69 k
     replacing  python36.x86_64 3.6.6-5.el7
 python3-devel                              x86_64                     3.6.8-13.el7                         base                                 215 k
     replacing  python36-devel.x86_64 3.6.6-5.el7
 python3-libs                               x86_64                     3.6.8-13.el7                         base                                 7.0 M
     replacing  python36-libs.x86_64 3.6.6-5.el7
Installing for dependencies:
 libtirpc                                   x86_64                     0.2.4-0.16.el7                       base                                  89 k
 python3-pip                                noarch                     9.0.3-7.el7_7                        centos-7-updates                     1.8 M
 python3-rpm-generators                     noarch                     6-2.el7                              base                                  20 k
 python3-setuptools                         noarch                     39.2.0-10.el7                        base                                 629 k

Transaction Summary
=======================================================================================================================================================
Install  3 Packages (+4 Dependent packages)

Total size: 9.7 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test


Transaction check error:
  file /usr/share/bash-completion/completions/pip3 from install of python3-pip-9.0.3-7.el7_7.noarch conflicts with file from package python34-pip-8.1.2-8.el7.noarch

Error Summary
-------------

Может быть, это будет полезно для решения проблемы:

[***** ~]$ ls -la /usr/share/bash-completion/completions/ | grep pip
-rw-r--r--. 1 root root   279 Mar  7  2019 pip3
lrwxrwxrwx. 1 root root     4 Apr  9  2019 pip3.4 -> pip3

[***** ~]$ cat /usr/share/bash-completion/completions/pip3

# pip bash completion start
_pip3_completion()
{
    COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \
                   COMP_CWORD=$COMP_CWORD \
                   PIP_AUTO_COMPLETE=1 $1 ) )
}
complete -o default -F _pip3_completion pip3 pip3.4 pip3.6
# pip bash completion end

Посоветуйте, пожалуйста, как установить pip для python3 .6 и не нарушать зависимости для python3 .4?

...