Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poetry and Torch CPU not working on Ubuntu #8604

Closed
FrancescoMandru opened this issue Nov 1, 2023 · 2 comments
Closed

Poetry and Torch CPU not working on Ubuntu #8604

FrancescoMandru opened this issue Nov 1, 2023 · 2 comments
Labels
kind/bug Something isn't working as expected

Comments

@FrancescoMandru
Copy link

  • Poetry version: 1.6.1
  • Python version: 3.8
  • OS version and name: Ubuntu 20.04.6 LTS
  • pyproject.toml: pyproject.toml

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']
@FrancescoMandru FrancescoMandru added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Nov 1, 2023
@dimbleby
Copy link
Contributor

dimbleby commented Nov 1, 2023

duplicate of all the others: #8580, #7902, #8326, #8002, etc. This is on torch.

please close

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
@abn abn removed the status/triage This issue needs to be triaged label Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

3 participants