Pytorch on a fresh install of ubuntu can't find my GPU












0















I have the latest ubuntu 18 installed just an hour ago. I have the newest anaconda 3.7 installed maybe 20 minutes ago. Then I proceeded to use



conda install pytorch torchvision -c pytorch


but when I open use python3 it still gives me



alex@alex:~$ python3
Python 3.7.0 (default, Jun 28 2018, 13:15:42)
[GCC 7.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda.is_available()
False
>>>


To be sure, I do have a gpu in my computer:



alex@alex:~$ lspci | grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] (rev a1)


I have also restarted my computer after the installing pytorch and it did not change anything. This is my second attempt at getting GPU to work on pytorch, my last attempt was on Lubuntu a few days ago using pip install and I installed some Nvidia drivers but still couldn't get it to work so i started anew.










share|improve this question























  • Is the VGA driver for your card correctly installed? Check askubuntu.com/questions/1045241/…

    – Mr.Michael.Schulze
    Dec 12 '18 at 11:48
















0















I have the latest ubuntu 18 installed just an hour ago. I have the newest anaconda 3.7 installed maybe 20 minutes ago. Then I proceeded to use



conda install pytorch torchvision -c pytorch


but when I open use python3 it still gives me



alex@alex:~$ python3
Python 3.7.0 (default, Jun 28 2018, 13:15:42)
[GCC 7.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda.is_available()
False
>>>


To be sure, I do have a gpu in my computer:



alex@alex:~$ lspci | grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] (rev a1)


I have also restarted my computer after the installing pytorch and it did not change anything. This is my second attempt at getting GPU to work on pytorch, my last attempt was on Lubuntu a few days ago using pip install and I installed some Nvidia drivers but still couldn't get it to work so i started anew.










share|improve this question























  • Is the VGA driver for your card correctly installed? Check askubuntu.com/questions/1045241/…

    – Mr.Michael.Schulze
    Dec 12 '18 at 11:48














0












0








0








I have the latest ubuntu 18 installed just an hour ago. I have the newest anaconda 3.7 installed maybe 20 minutes ago. Then I proceeded to use



conda install pytorch torchvision -c pytorch


but when I open use python3 it still gives me



alex@alex:~$ python3
Python 3.7.0 (default, Jun 28 2018, 13:15:42)
[GCC 7.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda.is_available()
False
>>>


To be sure, I do have a gpu in my computer:



alex@alex:~$ lspci | grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] (rev a1)


I have also restarted my computer after the installing pytorch and it did not change anything. This is my second attempt at getting GPU to work on pytorch, my last attempt was on Lubuntu a few days ago using pip install and I installed some Nvidia drivers but still couldn't get it to work so i started anew.










share|improve this question














I have the latest ubuntu 18 installed just an hour ago. I have the newest anaconda 3.7 installed maybe 20 minutes ago. Then I proceeded to use



conda install pytorch torchvision -c pytorch


but when I open use python3 it still gives me



alex@alex:~$ python3
Python 3.7.0 (default, Jun 28 2018, 13:15:42)
[GCC 7.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda.is_available()
False
>>>


To be sure, I do have a gpu in my computer:



alex@alex:~$ lspci | grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] (rev a1)


I have also restarted my computer after the installing pytorch and it did not change anything. This is my second attempt at getting GPU to work on pytorch, my last attempt was on Lubuntu a few days ago using pip install and I installed some Nvidia drivers but still couldn't get it to work so i started anew.







nvidia python anaconda






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 8 '18 at 10:32









wawawewawawawewa

31




31













  • Is the VGA driver for your card correctly installed? Check askubuntu.com/questions/1045241/…

    – Mr.Michael.Schulze
    Dec 12 '18 at 11:48



















  • Is the VGA driver for your card correctly installed? Check askubuntu.com/questions/1045241/…

    – Mr.Michael.Schulze
    Dec 12 '18 at 11:48

















Is the VGA driver for your card correctly installed? Check askubuntu.com/questions/1045241/…

– Mr.Michael.Schulze
Dec 12 '18 at 11:48





Is the VGA driver for your card correctly installed? Check askubuntu.com/questions/1045241/…

– Mr.Michael.Schulze
Dec 12 '18 at 11:48










2 Answers
2






active

oldest

votes


















0














Just found a solution, maybe.... Check https://ubuntuforums.org/showthread.php?t=2377560 for details.



Maybe you have a hybrid graphic card and this can cause a wrong installation of driver. Please also check that secure boot is disabled in bios.



Run in terminal:



sudo apt purge nvidia*
sudo apt update
sudo ubuntu-drivers autoinstall
sudo apt full-upgrade


Reboot and check again.






share|improve this answer































    0














    As I can see you have done "normal" installation of PyTorch, which is at the moment CUDA 9.



    I just checked the NVIDIA CUDA 9 Documentation , Ubuntu 18 is not supported in this case.
    If you want to use CUDA on Ubuntu 18, then you have to use CUDA 10 according to documentation.






    share|improve this answer























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "89"
      };
      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',
      autoActivateHeartbeat: false,
      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%2faskubuntu.com%2fquestions%2f1099362%2fpytorch-on-a-fresh-install-of-ubuntu-cant-find-my-gpu%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      Just found a solution, maybe.... Check https://ubuntuforums.org/showthread.php?t=2377560 for details.



      Maybe you have a hybrid graphic card and this can cause a wrong installation of driver. Please also check that secure boot is disabled in bios.



      Run in terminal:



      sudo apt purge nvidia*
      sudo apt update
      sudo ubuntu-drivers autoinstall
      sudo apt full-upgrade


      Reboot and check again.






      share|improve this answer




























        0














        Just found a solution, maybe.... Check https://ubuntuforums.org/showthread.php?t=2377560 for details.



        Maybe you have a hybrid graphic card and this can cause a wrong installation of driver. Please also check that secure boot is disabled in bios.



        Run in terminal:



        sudo apt purge nvidia*
        sudo apt update
        sudo ubuntu-drivers autoinstall
        sudo apt full-upgrade


        Reboot and check again.






        share|improve this answer


























          0












          0








          0







          Just found a solution, maybe.... Check https://ubuntuforums.org/showthread.php?t=2377560 for details.



          Maybe you have a hybrid graphic card and this can cause a wrong installation of driver. Please also check that secure boot is disabled in bios.



          Run in terminal:



          sudo apt purge nvidia*
          sudo apt update
          sudo ubuntu-drivers autoinstall
          sudo apt full-upgrade


          Reboot and check again.






          share|improve this answer













          Just found a solution, maybe.... Check https://ubuntuforums.org/showthread.php?t=2377560 for details.



          Maybe you have a hybrid graphic card and this can cause a wrong installation of driver. Please also check that secure boot is disabled in bios.



          Run in terminal:



          sudo apt purge nvidia*
          sudo apt update
          sudo ubuntu-drivers autoinstall
          sudo apt full-upgrade


          Reboot and check again.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 12 '18 at 11:56









          Mr.Michael.SchulzeMr.Michael.Schulze

          913




          913

























              0














              As I can see you have done "normal" installation of PyTorch, which is at the moment CUDA 9.



              I just checked the NVIDIA CUDA 9 Documentation , Ubuntu 18 is not supported in this case.
              If you want to use CUDA on Ubuntu 18, then you have to use CUDA 10 according to documentation.






              share|improve this answer




























                0














                As I can see you have done "normal" installation of PyTorch, which is at the moment CUDA 9.



                I just checked the NVIDIA CUDA 9 Documentation , Ubuntu 18 is not supported in this case.
                If you want to use CUDA on Ubuntu 18, then you have to use CUDA 10 according to documentation.






                share|improve this answer


























                  0












                  0








                  0







                  As I can see you have done "normal" installation of PyTorch, which is at the moment CUDA 9.



                  I just checked the NVIDIA CUDA 9 Documentation , Ubuntu 18 is not supported in this case.
                  If you want to use CUDA on Ubuntu 18, then you have to use CUDA 10 according to documentation.






                  share|improve this answer













                  As I can see you have done "normal" installation of PyTorch, which is at the moment CUDA 9.



                  I just checked the NVIDIA CUDA 9 Documentation , Ubuntu 18 is not supported in this case.
                  If you want to use CUDA on Ubuntu 18, then you have to use CUDA 10 according to documentation.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Dec 12 '18 at 16:23









                  Mr.Michael.SchulzeMr.Michael.Schulze

                  913




                  913






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Ask Ubuntu!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1099362%2fpytorch-on-a-fresh-install-of-ubuntu-cant-find-my-gpu%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

                      Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

                      ComboBox Display Member on multiple fields

                      Is it possible to collect Nectar points via Trainline?