0

I tried to run a PPO algorithm from the stable-baselines3 library on a basic gym environment on my local CPU, however I get the following RuntimeError:

RuntimeError: Calling torch.geqrf on a CPU tensor requires compiling PyTorch with LAPACK. Please use PyTorch built with LAPACK support.

I'm using a conda environment on a Windows machine, with following installations:

pytorch 1.12.1 cpu_py39h5e1f01c_0

lapack 3.9.0 netlib conda-forge

Since I'm quite new to Python I have no clue how to resolve this issue and web search didn't give any proper instructions on that specific problem.

I tried uninstalling PyTorch in my anaconda prompt, however this would remove a lot of packages which scared me of breaking something. Hence, I'm lost what else to do in order to build PyTorch with Lapack support...

Any help would be appreciated, Cheers.

  • 1
    well, you shouldn't be scared of trying to break something in anaconda environment during experiments -- that's what they actually are for. I suspect your lapack dependency comes with torchaudio or torchvision packets that you do not install. Try this in a fresh environment: `conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cpuonly -c pytorch`. [Source:](https://pytorch.org/get-started/previous-versions/#v1121) – gehirndienst Dec 06 '22 at 08:44
  • I'm having the exact same problem, did you find a solution yet? – Albert Schrotenboer Jan 03 '23 at 12:19
  • I deinstalled pytorch from my environment and installed it for CPU only (following instruction from https://pytorch.org/get-started/locally/), then it worked out for me actually. – n.dresemann Jan 03 '23 at 15:00

0 Answers0