0

I want to be able to launch a python program simply by clicking an icon on the desktop. The program uses pycuda and the NVCC compiler from NVIDIA. I have created the following desktop file

[Desktop Entry]
Type=Application
Terminal=true
Name=Trial4
Icon=utilities-terminal
Exec=/home/mantis/Desktop/trial4.sh 2>~/Desktop/trial4.log
#Exec=python3 /home/mantis/Desktop/sandpit/Trial4.py 2>~/Desktop/trial4.log
Categories=Application;

The Exec command works fine from the command prompt, but when I try to run the desktop file, I get this in the error log:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/pytools-2019.1.1-py3.6.egg/pytools/prefork.py", line 50, in call_capture_output
    stderr=PIPE)
  File "/usr/lib/python3.6/subprocess.py", line 729, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.6/subprocess.py", line 1364, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'nvcc': 'nvcc'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/mantis/Desktop/sandpit/Trial4.py", line 23, in <module>
    import sigpack_v2 as sp2
  File "/home/mantis/Desktop/sandpit/sigpack_v2.py", line 276, in <module>
    """)
  File "/usr/local/lib/python3.6/dist-packages/pycuda-2019.1.2-py3.6-linux-aarch64.egg/pycuda/compiler.py", line 291, in __init__
    arch, code, cache_dir, include_dirs)
  File "/usr/local/lib/python3.6/dist-packages/pycuda-2019.1.2-py3.6-linux-aarch64.egg/pycuda/compiler.py", line 254, in compile
    return compile_plain(source, options, keep, nvcc, cache_dir, target)
  File "/usr/local/lib/python3.6/dist-packages/pycuda-2019.1.2-py3.6-linux-aarch64.egg/pycuda/compiler.py", line 78, in compile_plain
    checksum.update(preprocess_source(source, options, nvcc).encode("utf-8"))
  File "/usr/local/lib/python3.6/dist-packages/pycuda-2019.1.2-py3.6-linux-aarch64.egg/pycuda/compiler.py", line 50, in preprocess_source
    result, stdout, stderr = call_capture_output(cmdline, error_on_nonzero=False)
  File "/usr/local/lib/python3.6/dist-packages/pytools-2019.1.1-py3.6.egg/pytools/prefork.py", line 227, in call_capture_output
    return forker.call_capture_output(cmdline, cwd, error_on_nonzero)
  File "/usr/local/lib/python3.6/dist-packages/pytools-2019.1.1-py3.6.egg/pytools/prefork.py", line 61, in call_capture_output
    % (" ".join(cmdline), e))
pytools.prefork.ExecError: error invoking 'nvcc --preprocess -arch sm_53 -I/usr/local/lib/python3.6/dist-packages/pycuda-2019.1.2-py3.6-linux-aarch64.egg/pycuda/cuda /tmp/tmputmjhvkh.cu --compiler-options -P': [Errno 2] No such file or directory: 'nvcc': 'nvcc'

Could anyone advise what the problem is?

0 Answers0