TylerYep / torchinfo

View model summaries in PyTorch!
MIT License
2.56k stars 119 forks source link

A cpu version pytorch needs to be installed when installing torchinfo with Conda #155

Closed 1ofsomepeople closed 2 years ago

1ofsomepeople commented 2 years ago

Describe the bug When I try to install torchinfo with Conda, the recommend command "conda install -c conda-forge torchinfo" want to install a CPU version pytorch, but I have installed a GPU version pytorch. I didn't notice that the first time, and It makes my GPU version pytorch is unavailiable.

Expected behavior Can I use torchinfo with GPU version Pytorch the same time?

Screenshots

issue

TylerYep commented 2 years ago

You should install the GPU version of pytorch first, and then when you install torchinfo after it will realize the dependency is already satisfied.

1ofsomepeople commented 2 years ago

Thanks for help. I found the GPU version of Pytorch is installed by pip, which cann't be mannaged by conda, so i reinstalled a GPU version of Pytorch by conda, and it works.