Forum Stats

  • 3,750,344 Users
  • 2,250,158 Discussions


Python3 Installation in Solaris 10

ashud1 Member Posts: 483 Blue Ribbon
edited Oct 22, 2019 7:40AM in Solaris 10


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.



  • Tomáš Glozar
    Tomáš Glozar Member Posts: 23 Green Ribbon
    edited Jun 25, 2019 1:58PM

    Hi ashud1,

    You can install GCC from the OpenCSW repository: 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


  • fritz.kraus
    fritz.kraus Member Posts: 13 Red Ribbon
    edited Oct 22, 2019 7:40AM

    good tip, thank you. Worked for our build nodes