Changes

Jump to navigation Jump to search
Update details to install latest Python SCL version
Line 17: Line 17:  
To be able to install an application from the Software Collections, one '''must''' install software collections first. Please see [[Software collections]] on how to install this.
 
To be able to install an application from the Software Collections, one '''must''' install software collections first. Please see [[Software collections]] on how to install this.
   −
The below procedure if for Python 3.3, but you can also install Python 2.7 instead or even along side. Simply replace all '33' metionings with '27'. To switch between the two versions, you need to remove the enablepythonxx.sh script from the /etc/profile.d directory as described below.  
+
The below procedure if for Python 3.6, but you can also install Python 2.7 instead or even along side. Simply replace all '36' metionings with '27'. To switch between the two versions, you need to remove the enablepythonxx.sh script from the /etc/profile.d directory as described below.  
       
====Required repository====
 
====Required repository====
After installing Software Collections, the [http://wiki.contribs.org/Scl#tab=Python33 '''scl'''] repository for Python has to be added to the yum repositories. Please see [http://wiki.contribs.org/Scl#tab=Python33 '''here'''] on how the enable the [http://wiki.contribs.org/Scl#tab=Pyton33 '''scl-python33'''] repository.
+
After installing Software Collections, the [http://wiki.contribs.org/Scl#tab=Python3 '''scl'''] repository for Python has to be added to the yum repositories. Please see [http://wiki.contribs.org/Scl#tab=Python3 '''here'''] on how the enable the [http://wiki.contribs.org/Scl#tab=Pyton3 '''scl-python36'''] repository.
       
====Install application====
 
====Install application====
After installing the scl-python33 repository, Python can be installed by issuing the following command:
+
After installing the scl-python36 repository, Python can be installed by issuing the following command:
  yum install python33 --enablerepo=centos-sclo-rh
+
  yum install rh-python36 --enablerepo=centos-sclo-rh
Once installed, the application is installed on your SME Server at '''/opt/rh/python33''' as an isolated environment for the application.
+
Once installed, the application is installed on your SME Server at '''/opt/rh/rh-python36''' as an isolated environment for the application.
    
====Test installed application====
 
====Test installed application====
Line 35: Line 35:     
A simple man page about the installed application is now available via:
 
A simple man page about the installed application is now available via:
  scl enable python33 'man python33'
+
  scl enable rh-python36 'man rh-python36'
 
press 'q' to leave the man page
 
press 'q' to leave the man page
   Line 42: Line 42:  
{{Note box|More examples to follow}}
 
{{Note box|More examples to follow}}
   −
To make use of Python version 3.3.2 in the current shell environment, one needs to enter the following command:
+
To make use of Python version 3.6.9 in the current shell environment, one needs to enter the following command:
  scl enable python33 bash
+
  scl enable rh-python36 bash
 
and test with:
 
and test with:
 
  python --version
 
  python --version
      −
====Enable the python 3.3 environment at boot time====
+
====Enable the python 3.6 environment at boot time====
The preferred way to enable scl python33 permanently at logout or (re)boot is to add a custom script called 'enablepython33.sh' to /etc/profile.d/ directory with the following content and make it executable.
+
The preferred way to enable scl python36 permanently at logout or (re)boot is to add a custom script called 'enablepython36.sh' to /etc/profile.d/ directory with the following content and make it executable.
    
  #!/bin/sh
 
  #!/bin/sh
  source /opt/rh/python33/enable
+
  source /opt/rh/rh-python36/enable
  export X_SCLS="`scl enable python33 'echo $X_SCLS'`"
+
  export X_SCLS="`scl enable rh-python36 'echo $X_SCLS'`"
    
==Other articles in this category==
 
==Other articles in this category==

Navigation menu