How can I know a software's install position in my CentOS?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












In my CentOS7 there are multi python, I check the default python version by:



# python3 -V
Python 3.6.0a1


but how can I know its position in my CentOS?










share|improve this question

























    up vote
    1
    down vote

    favorite












    In my CentOS7 there are multi python, I check the default python version by:



    # python3 -V
    Python 3.6.0a1


    but how can I know its position in my CentOS?










    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      In my CentOS7 there are multi python, I check the default python version by:



      # python3 -V
      Python 3.6.0a1


      but how can I know its position in my CentOS?










      share|improve this question













      In my CentOS7 there are multi python, I check the default python version by:



      # python3 -V
      Python 3.6.0a1


      but how can I know its position in my CentOS?







      centos python






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 7 at 6:41









      sof-03

      1103




      1103




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          which python3 will show you the path to Python executable; if you want to find out the root dir where the Python library files are installed, use sys.prefix:



          $ python3 -c "import sys; print(sys.prefix)"





          share|improve this answer



























            up vote
            1
            down vote













            Use rpm -ql. Like so:




            $ rpm -ql python
            /usr/bin/pydoc
            /usr/bin/python
            /usr/bin/python2
            /usr/bin/python2.7
            /usr/share/doc/python-2.7.5
            /usr/share/doc/python-2.7.5/LICENSE
            /usr/share/doc/python-2.7.5/README
            /usr/share/man/man1/python.1.gz
            /usr/share/man/man1/python2.1.gz
            /usr/share/man/man1/python2.7.1.gz


            -q = Query
            -l = List



            See man rpm for all options.



            Or simply:



            $ which python
            /usr/bin/python


            ...to see where the binary is.






            share|improve this answer






















              Your Answer







              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "106"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              convertImagesToLinks: false,
              noModals: false,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













               

              draft saved


              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f460968%2fhow-can-i-know-a-softwares-install-position-in-my-centos%23new-answer', 'question_page');

              );

              Post as a guest






























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              1
              down vote



              accepted










              which python3 will show you the path to Python executable; if you want to find out the root dir where the Python library files are installed, use sys.prefix:



              $ python3 -c "import sys; print(sys.prefix)"





              share|improve this answer
























                up vote
                1
                down vote



                accepted










                which python3 will show you the path to Python executable; if you want to find out the root dir where the Python library files are installed, use sys.prefix:



                $ python3 -c "import sys; print(sys.prefix)"





                share|improve this answer






















                  up vote
                  1
                  down vote



                  accepted







                  up vote
                  1
                  down vote



                  accepted






                  which python3 will show you the path to Python executable; if you want to find out the root dir where the Python library files are installed, use sys.prefix:



                  $ python3 -c "import sys; print(sys.prefix)"





                  share|improve this answer












                  which python3 will show you the path to Python executable; if you want to find out the root dir where the Python library files are installed, use sys.prefix:



                  $ python3 -c "import sys; print(sys.prefix)"






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Aug 7 at 6:58









                  hoefling

                  5011410




                  5011410






















                      up vote
                      1
                      down vote













                      Use rpm -ql. Like so:




                      $ rpm -ql python
                      /usr/bin/pydoc
                      /usr/bin/python
                      /usr/bin/python2
                      /usr/bin/python2.7
                      /usr/share/doc/python-2.7.5
                      /usr/share/doc/python-2.7.5/LICENSE
                      /usr/share/doc/python-2.7.5/README
                      /usr/share/man/man1/python.1.gz
                      /usr/share/man/man1/python2.1.gz
                      /usr/share/man/man1/python2.7.1.gz


                      -q = Query
                      -l = List



                      See man rpm for all options.



                      Or simply:



                      $ which python
                      /usr/bin/python


                      ...to see where the binary is.






                      share|improve this answer


























                        up vote
                        1
                        down vote













                        Use rpm -ql. Like so:




                        $ rpm -ql python
                        /usr/bin/pydoc
                        /usr/bin/python
                        /usr/bin/python2
                        /usr/bin/python2.7
                        /usr/share/doc/python-2.7.5
                        /usr/share/doc/python-2.7.5/LICENSE
                        /usr/share/doc/python-2.7.5/README
                        /usr/share/man/man1/python.1.gz
                        /usr/share/man/man1/python2.1.gz
                        /usr/share/man/man1/python2.7.1.gz


                        -q = Query
                        -l = List



                        See man rpm for all options.



                        Or simply:



                        $ which python
                        /usr/bin/python


                        ...to see where the binary is.






                        share|improve this answer
























                          up vote
                          1
                          down vote










                          up vote
                          1
                          down vote









                          Use rpm -ql. Like so:




                          $ rpm -ql python
                          /usr/bin/pydoc
                          /usr/bin/python
                          /usr/bin/python2
                          /usr/bin/python2.7
                          /usr/share/doc/python-2.7.5
                          /usr/share/doc/python-2.7.5/LICENSE
                          /usr/share/doc/python-2.7.5/README
                          /usr/share/man/man1/python.1.gz
                          /usr/share/man/man1/python2.1.gz
                          /usr/share/man/man1/python2.7.1.gz


                          -q = Query
                          -l = List



                          See man rpm for all options.



                          Or simply:



                          $ which python
                          /usr/bin/python


                          ...to see where the binary is.






                          share|improve this answer














                          Use rpm -ql. Like so:




                          $ rpm -ql python
                          /usr/bin/pydoc
                          /usr/bin/python
                          /usr/bin/python2
                          /usr/bin/python2.7
                          /usr/share/doc/python-2.7.5
                          /usr/share/doc/python-2.7.5/LICENSE
                          /usr/share/doc/python-2.7.5/README
                          /usr/share/man/man1/python.1.gz
                          /usr/share/man/man1/python2.1.gz
                          /usr/share/man/man1/python2.7.1.gz


                          -q = Query
                          -l = List



                          See man rpm for all options.



                          Or simply:



                          $ which python
                          /usr/bin/python


                          ...to see where the binary is.







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Aug 16 at 17:13

























                          answered Aug 7 at 6:55









                          maulinglawns

                          5,9882924




                          5,9882924



























                               

                              draft saved


                              draft discarded















































                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f460968%2fhow-can-i-know-a-softwares-install-position-in-my-centos%23new-answer', 'question_page');

                              );

                              Post as a guest













































































                              Popular posts from this blog

                              How to check contact read email or not when send email to Individual?

                              Displaying single band from multi-band raster using QGIS

                              How many registers does an x86_64 CPU actually have?