You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to import torch in a Python file in Ubuntu (Pytorch Versions >= 2) is broken:
while it seems to work for pytorch version <2 (because it installs all the cuda even if is not requeted).
Using pip instead, it works like a charm
python
Python 3.8.10 (default, May 26 2023, 14:05:08)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
Traceback (most recent call last):
File "/home/francesco/.cache/pypoetry/virtualenvs/test-Bk5ZgSl_-py3.8/lib/python3.8/site-packages/torch/__init__.py", line 174, in _load_global_deps
ctypes.CDLL(lib_path, mode=ctypes.RTLD_GLOBAL)
File "/usr/lib/python3.8/ctypes/__init__.py", line 373, in __init__
self._handle = _dlopen(self._name, mode)
OSError: libcufft.so.11: cannot open shared object file: No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/francesco/.cache/pypoetry/virtualenvs/test-Bk5ZgSl_-py3.8/lib/python3.8/site-packages/torch/__init__.py", line 234, in <module>
_load_global_deps()
File "/home/francesco/.cache/pypoetry/virtualenvs/test-Bk5ZgSl_-py3.8/lib/python3.8/site-packages/torch/__init__.py", line 195, in _load_global_deps
_preload_cuda_deps(lib_folder, lib_name)
File "/home/francesco/.cache/pypoetry/virtualenvs/test-Bk5ZgSl_-py3.8/lib/python3.8/site-packages/torch/__init__.py", line 160, in _preload_cuda_deps
raise ValueError(f"{lib_name} not found in the system path {sys.path}")
ValueError: libcublas.so.*[0-9] not found in the system path ['', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/home/francesco/.cache/pypoetry/virtualenvs/test-Bk5ZgSl_-py3.8/lib/python3.8/site-packages']
The text was updated successfully, but these errors were encountered:
Trying to import torch in a Python file in Ubuntu (Pytorch Versions >= 2) is broken:
while it seems to work for pytorch version <2 (because it installs all the cuda even if is not requeted).
Using pip instead, it works like a charm
The text was updated successfully, but these errors were encountered: