Skip to content
This repository has been archived by the owner on Jun 18, 2019. It is now read-only.

CentOS- 7 problem #91

Open
rmoriz opened this issue Apr 19, 2017 · 6 comments
Open

CentOS- 7 problem #91

rmoriz opened this issue Apr 19, 2017 · 6 comments

Comments

@rmoriz
Copy link

rmoriz commented Apr 19, 2017

Looks like

python_runtime '2' do
  options :system
end

on CentOS 7 does install python27 from scl (I thought system would use the default packges?), however pip is not working/installed:

 * yum_package[] action install (up to date)
    * python_runtime[2] action install
      * poise_languages_scl[python27] action install
        * yum_package[centos-release-scl-rh] action upgrade
          - upgrade package centos-release-scl-rh from uninstalled to 2-2.el7.centos
        * ruby_block[flush_yum_cache] action run
          - execute the ruby block flush_yum_cache
        * yum_package[python27] action install
          - install version 1.1-25.el7 of package python27
        * yum_package[python27-python-devel] action install (up to date)
      
      * python_runtime_pip[2] action install (up to date)
      * python_package[setuptools] action install (up to date)
      * python_package[wheel] action install (up to date)
      * python_package[virtualenv] action install (up to date)
       (up to date)
    * python_package[azure] action install
      
      ================================================================================
      Error executing action `install` on resource 'python_package[azure]'
      ================================================================================
      
      Mixlib::ShellOut::ShellCommandFailed
      ------------------------------------
      Expected process to exit with [0], but received '1'
      ---- Begin output of ["/usr/bin/python", "-m", "pip.__main__", "list"] ----
      STDOUT: 
      STDERR: /usr/bin/python: No module named pip
      ---- End output of ["/usr/bin/python", "-m", "pip.__main__", "list"] ----
      Ran ["/usr/bin/python", "-m", "pip.__main__", "list"] returned 1

… and the system has now two python 2.x installed:

rpm -qa|grep -i python-2.7
python-2.7.5-48.el7.x86_64
python27-python-2.7.8-16.el7.x86_64

Any ideas?

My goal is not to setup a good python environment for a custom application but to install duplicity from epel and to install additional python packages to the system python which is used by the duplicity package.

@jblaine
Copy link
Contributor

jblaine commented May 23, 2017

What version of poise-python are you using?

@jblaine
Copy link
Contributor

jblaine commented May 23, 2017

Are you sure you are not also calling the recipe poise-python::default somewhere?

@scalp42
Copy link

scalp42 commented Feb 27, 2018

Same issue here:

default['xxx']['python'] = {
  2 => 'install',
  3 => 'install',
  'pypy' => 'nothing'
}

node['xxx']['python'].each do |k, v|
  python_runtime k do
    action v
    options :system
  end
end

Shell:

[root@default-centos-7 ~]# yum list installed | egrep "python27-python.x86_64|^python.x86_64"
python.x86_64                        2.7.5-58.el7                @anaconda
python27-python.x86_64               2.7.13-3.el7                @centos-sclo-rh

@coderanger
Copy link
Member

@scalp42 What output do you see from Chef?

@scalp42
Copy link

scalp42 commented Feb 27, 2018

Recipe:

include_recipe 'build-essential'

node['xxx']['python'].each do |k, v|
  python_runtime k do
    action v
    options :system
  end
end

Results: https://gist.github.com/scalp42/16c93ec80676329dd65e9f41dbcf4f48

@jorisd
Copy link

jorisd commented May 17, 2018

Same problem here, tries to use scl although I explicitly asks to use :system

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants