question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Conda installs a cpu version of pytorch and torchvision

See original GitHub issue

Conda installation (tested on Ubuntu 20.04) installs a cpu version of pytorch and torchvision. In my own project, the only remedy I’ve found was to hardcode the pytorch package to use. Poor solution. Hoping to find an alternative.

Related to #527

result from conda list in torchgeo environment: ksnip_20220503-162044 ksnip_20220503-162055

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ashnair1commented, May 4, 2022

@ashnair1 @calebrob6 this relates to #295. I believe both pytorch-cpu and pytorch-gpu satisfy pytorch, but it’s always been unclear to me how to decide which conda actually uses. I wonder if running conda install pytorch-gpu explicitly after installing the environment would help.

Just tried installing pytorch-gpu (conda install pytorch-gpu -c pytorch) on top on my pre-existing conda environment (on Ubuntu 20.04 again), and it seems to be working. Don’t know how this could be elegantly done without having to add a step in the installation process. Ideally, conda could check if there’s a gpu or not and install accordingly, but I don’t think we’re close to having that feature.

I believe conda does have a way to determine if your device has a gpu or not via virtual packages. Refer here. But I’m still not clear on the details.

1reaction
ashnair1commented, May 4, 2022

For what it’s worth I’ve opened conda-forge/pytorch-cpu-feedstock#102 to look into this. I didn’t observe this when I pushed #295 so I’m not sure if it’s a new development but I can reproduce this now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Torchvision Cpu - :: Anaconda.org
conda install. To install this package run one of the following: conda install -c pytorch torchvision-cpu. Description. By data scientists, for data ...
Read more >
Installing Pytorch with Conda installs CPU only version
I am trying to install pytorch 1.4 with torchversion 0.5 that are compatible with CUDA. Every time I install them I get “pytorch...
Read more >
Why does Anaconda install pytorch cpuonly when I install cuda?
no installing torchaudio , it will install cpu versions of pytorch and torchvision . I found it interesting and don't know why.
Read more >
Install Pytorch for GPU and CPU using Conda on Ubuntu
Set up virtual environment for pytorch using conda · Install Anaconda or Miniconda depends on your taste. Go to anaconda or miniconda's website ......
Read more >
Getting started with PyTorch - IBM
pytorch - Installs the GPU-enabled variants of PyTorch, torchvision, ... Depending on the version of conda being used, the installer may not be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found