2

I am trying to enable rh-python36 software collection after reboot So I can avoid calling "scl enable" all the time.
After unzipping and installing the package:

yum install -y tmp/rpms/*

I created a new file "python36.sh" under /etc/profile.d with the following script:

#!/bin/bash
source /opt/rh/rh-python36/enable
export X_SCLS="`scl enable rh-python36 'echo $X_SCLS'`"

After restarting or rebooting the instance, I am getting : No such file or directoryenable
I am using CentOS release 6.10 (Final)

zegoat7
  • 457
  • 1
  • 6
  • 14
  • Your solution looks right, so seems to me that something went wrong with the installation. I installed it using `yum -y install rh-python36` – Federico May 27 '19 at 01:55

3 Answers3

1

If you have the root privilege, then add the line of code below to the .bash_profile file found in your root directory:

source /opt/rh/rh-python36/enable
zegoat7
  • 457
  • 1
  • 6
  • 14
0

Try this:

#!/bin/bash
source scl_source enable rh-python36

Reference Doc: https://access.redhat.com/solutions/527703

GoinOff
  • 1,792
  • 1
  • 18
  • 37
0

This is the command for the Dockerfile that works for me:

RUN echo "source scl_source enable rh-python36" >> /etc/bashrc