2 Replies Latest reply on Oct 22, 2019 11:40 AM by fritz.kraus

    Python3 Installation in Solaris 10

    ashud1

      Hi,

      I have to installed Python 3.7 on the Solaris Machine (11) which actually running Python 2.7 Currently.

      Till Now i have done this.

       

      1. wget the Python 3.7.

      2. Tried Configuring it using ./Configure. But it has failed .

      no acceptable c compiler found in $path

       

      3. i tried executing gcc but it gave me unknown command.

       

      please share if any one has some pointer about this.

       

      P.s : i have requirement to have both python version running.

        • 1. Re: Python3 Installation in Solaris 10
          Tomáš Glozar

          Hi ashud1,

           

          You can install GCC from the OpenCSW repository:  https://www.opencsw.org/packages/CSWgcc5core/. Everything from the repository is installed to /opt/csw/bin in order not to interfere with the system files and can be uninstalled simply by removing all packages with names beginning with CSW and deleting the /opt/csw directory - you can also install Python into a custom directory using the option --prefix to configure.

           

          Alternatively you can install the Solaris Studio from the Oracle website, but I'm not sure whether it can build Python 3.

           

          UPDATE: There is a solution that does not require installing third party repositories. (Apparently GCC 3 from Sun/Oracle can build Python 3.7.)

           

          Make sure you have the package SUNWgcc installed. (You can find it on the Solaris 10 ISO.)

           

          Then you can install Python 3.7 with the use of some hacks (assuming you are in the directory with its source):

           

          # ln -s /usr/sfw/bin/gar /usr/sfw/bin/ar

          # PATH=/usr/sfw/bin:$PATH

          # ./configure --prefix=/opt/python3

          # gmake

          # gmake install

          # unlink /usr/sfw/bin/ar

           

          Tom

           

           

          • 2. Re: Python3 Installation in Solaris 10
            fritz.kraus

            good tip, thank you. Worked for our build nodes