Problem Description:. I run pycuda’s sample code on the local side of Linux without any problems. However, when I use pycharm to debug code remotely, the above problem occurs.
This problem needs two steps. If it can be realized after the first step, the second step is not needed
Step 1:
export PATH=”/usr/local/cuda/bin:$PATH”
export LD_ LIBRARY_ PATH=”/usr/local/cuda/lib64:$LD_LIBRARY_PATH”Steps
1. find .bashrc file.
2. Add above lines to it.
3. source .bashrc
4. To Test run command “nvcc –version”
Some people use cuda-10.1 (version number) in this place, but I use CUDA because my CUDA here is a cuda-10.1 soft connection (equivalent to a shortcut). So the first “L” in “lrwxrwxrwx” means soft connection. Therefore, the above two methods are OK.
Step 2:
open compiler.py
Add the following code
nvcc = ‘/usr/local/cuda/bin/’ + nvcc
As follows:
def compile_plain(source, options, keep, nvcc, cache_dir, target="cubin"):
from os.path import join
assert target in ["cubin", "ptx", "fatbin"]
nvcc = '/usr/local/cuda/bin/' + nvcc # --> here is the new line
if cache_dir:
checksum = _new_md5()
...
File location of compiler.py:
Because I have an envs, I found it under one of them. You can use the locate command to locate.
anaconda3/envs/torch19/lib/python3.7/site-packages/pycuda
Command:
find ./lib/python3.7/site-packages -name compiler.py
Read More:
- ImportError: libcudnn.so.7: cannot open shared object file: No such file or directory
- When Python Django creates a database, can’t open file ‘ manage.py ‘: [Errno 2] No such file or directory
- OSError: libnccl.so.2: cannot open shared object file: No such file or directory
- fatal error: Python.h: No such file or directory compilation terminated.
- No code, a solution to the error in the path of reading CSV file by Python: filenotfounderror: [errno 2] no such file or directory: ‘XX. CSV‘
- Solution of header file StdAfx. H “no such file or directory” in Visual Studio
- Solve syntax error: unexpected end of file or /bin/bash^m: bad interpeneter: no match file or directory
- Cannot open include file: ‘io.h‘: No such file or directory
- Error: ENOENT: no such file or directory, mkdir E:\
- fatal error: Python.h: No such file or directory
- The Linux terminal appears bash: setup.bash : no such file or directory, and. Bashrc file
- VS2010 compiler can’t open include file: “GL / glaux. H”: no such file or directory
- No such file or directory
- In VS2010, the compiler cannot open the file “GL / glaux. H”: no such file or directory
- fatal error: Python.h: No such file or directory
- Ubuntu 64 prompts bash: no such file or directory file exists
- [tools] vscode debug report G + +. Exe no such file or directory fatal error no input files
- Importerror of [docker] error: libGL.so .1: cannot open shared object file: No such file or directory
- [C]fatal error: mysql.h: No such file or directory
- #During OpenGL development, fatal error C1083: can’t open include file: “GL / glut. H”: no such file or directory