SublimeText3 is Building in Python 2 but I want to use Python 3. How do I Change Versions (Ubuntu 18.04)?











up vote
0
down vote

favorite












I'm trying to get SublimeText3 to build with Python 3 on Ubuntu 18.04. I have python 3.6.6 installed on my Ubuntu machine, but Sublime is defaulting to Python 2 when I press ctrl+b. When I search with the "build with" option, no Python 3 option is available.



What do I have to do to get the option of using Python 3 in my SublimeText3 project builds?










share|improve this question


























    up vote
    0
    down vote

    favorite












    I'm trying to get SublimeText3 to build with Python 3 on Ubuntu 18.04. I have python 3.6.6 installed on my Ubuntu machine, but Sublime is defaulting to Python 2 when I press ctrl+b. When I search with the "build with" option, no Python 3 option is available.



    What do I have to do to get the option of using Python 3 in my SublimeText3 project builds?










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'm trying to get SublimeText3 to build with Python 3 on Ubuntu 18.04. I have python 3.6.6 installed on my Ubuntu machine, but Sublime is defaulting to Python 2 when I press ctrl+b. When I search with the "build with" option, no Python 3 option is available.



      What do I have to do to get the option of using Python 3 in my SublimeText3 project builds?










      share|improve this question













      I'm trying to get SublimeText3 to build with Python 3 on Ubuntu 18.04. I have python 3.6.6 installed on my Ubuntu machine, but Sublime is defaulting to Python 2 when I press ctrl+b. When I search with the "build with" option, no Python 3 option is available.



      What do I have to do to get the option of using Python 3 in my SublimeText3 project builds?







      python sublimetext3 python-3.6 sublime-build






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked yesterday









      Craig

      104




      104
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted











          Tools -> Build System -> New Build System




          {
          "cmd": ["python3", "-u", "$file"],
          "file_regex": "^[ ]File "(...?)", line ([0-9]*)",
          "selector": "source.python"
          }


          Save it with the name python3




          Go to Tools -> Build system -> and check python3




          Try to test it using:



          import sys
          print(sys.version)


          Press: Ctrl + b



          Source: https://gist.github.com/zaemiel/4fbd8b5125fda7a140be






          share|improve this answer























          • Thank you! Had one typo throwing me for a loop but I found it!
            – Craig
            yesterday











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          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: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53366919%2fsublimetext3-is-building-in-python-2-but-i-want-to-use-python-3-how-do-i-change%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote



          accepted











          Tools -> Build System -> New Build System




          {
          "cmd": ["python3", "-u", "$file"],
          "file_regex": "^[ ]File "(...?)", line ([0-9]*)",
          "selector": "source.python"
          }


          Save it with the name python3




          Go to Tools -> Build system -> and check python3




          Try to test it using:



          import sys
          print(sys.version)


          Press: Ctrl + b



          Source: https://gist.github.com/zaemiel/4fbd8b5125fda7a140be






          share|improve this answer























          • Thank you! Had one typo throwing me for a loop but I found it!
            – Craig
            yesterday















          up vote
          0
          down vote



          accepted











          Tools -> Build System -> New Build System




          {
          "cmd": ["python3", "-u", "$file"],
          "file_regex": "^[ ]File "(...?)", line ([0-9]*)",
          "selector": "source.python"
          }


          Save it with the name python3




          Go to Tools -> Build system -> and check python3




          Try to test it using:



          import sys
          print(sys.version)


          Press: Ctrl + b



          Source: https://gist.github.com/zaemiel/4fbd8b5125fda7a140be






          share|improve this answer























          • Thank you! Had one typo throwing me for a loop but I found it!
            – Craig
            yesterday













          up vote
          0
          down vote



          accepted







          up vote
          0
          down vote



          accepted







          Tools -> Build System -> New Build System




          {
          "cmd": ["python3", "-u", "$file"],
          "file_regex": "^[ ]File "(...?)", line ([0-9]*)",
          "selector": "source.python"
          }


          Save it with the name python3




          Go to Tools -> Build system -> and check python3




          Try to test it using:



          import sys
          print(sys.version)


          Press: Ctrl + b



          Source: https://gist.github.com/zaemiel/4fbd8b5125fda7a140be






          share|improve this answer















          Tools -> Build System -> New Build System




          {
          "cmd": ["python3", "-u", "$file"],
          "file_regex": "^[ ]File "(...?)", line ([0-9]*)",
          "selector": "source.python"
          }


          Save it with the name python3




          Go to Tools -> Build system -> and check python3




          Try to test it using:



          import sys
          print(sys.version)


          Press: Ctrl + b



          Source: https://gist.github.com/zaemiel/4fbd8b5125fda7a140be







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited yesterday

























          answered yesterday









          Dekel

          42k44567




          42k44567












          • Thank you! Had one typo throwing me for a loop but I found it!
            – Craig
            yesterday


















          • Thank you! Had one typo throwing me for a loop but I found it!
            – Craig
            yesterday
















          Thank you! Had one typo throwing me for a loop but I found it!
          – Craig
          yesterday




          Thank you! Had one typo throwing me for a loop but I found it!
          – Craig
          yesterday


















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53366919%2fsublimetext3-is-building-in-python-2-but-i-want-to-use-python-3-how-do-i-change%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

          SQL update select statement

          'app-layout' is not a known element: how to share Component with different Modules