Parlai 1.7.0 on WSL 2 Python 3.8.10 CUDA_HOME environment variable not set.
See original GitHub issueBug description CUDA_HOME environment variable not set error when running on WSL 2 when running parlai in the shell.
Reproduction steps Install Parlai and friends via jupyter notebook on vscode.
!pip3 install parlai==1.7.0
!pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116
!pip3 install transformers
Notice that Cuda is still true here when evaluated.
It seems like Parlai is looking for it in the wrong place.
Expected behavior
Give a clear and concise description of what you expected to happen.
If you install parlai 1.6.0 it doesn’t give me the error.
In 1.6.0 it works just fine. Cuda is also True if you evaluate the device.
Logs
Please paste the command line output:
Output goes here
Additional context Blocks usage on WSL 2 probably @klshuster
Issue Analytics
- State:
- Created a year ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
python - Get CUDA_HOME environment path PYTORCH
Solution to above issue! As cuda installed through anaconda is not the entire package. Please install cuda drivers manually from Nvidia ...
Read more >Installation - IceVision
OSError : CUDA_HOME environment variable is not set. Please set it to your CUDA install root. Try installing it with: sudo apt install...
Read more >Common Issues — MinkowskiEngine 0.5.3 documentation
In this case, make sure you set the environment variable CUDA_HOME to the right path and install the MinkowskiEngine. export CUDA_HOME=/usr/local/cuda ...
Read more >AUR (en) - python-detectron2-git - Arch Linux
found another issue. OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root. even after reboot(via installation cuda ......
Read more >Install TensorFlow with GPU for Windows 10 - NITISH MUTHA
I could not find any good and clear source for setting up ... Create new environment, with the name tensorflow-gpu and python version...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@ArEnSc We pushed a fix with #4779 that should protect this import. We have not made an official release yet, but if you wanted to pull that into your installed package and see if it works, it may be of use
I don’t have access to a WSL2 ubuntu. eg I can’t reproduce the issue that you are having.
I’m deeply confused by what you are saying here. If you are using a WSL2 ubuntu, why would your “bin/nvcc is a windows binary exe”? isn’t that supposed to be an Linux executable?
could you try install CUDA properly in Ubuntu? Like: https://askubuntu.com/questions/1280205/problem-while-installing-cuda-toolkit-in-ubuntu-18-04/1315116#1315116?newreg=ec85792ef03b446297a665e21fff5735