Open Immortalin opened 1 year ago
Not sure about your environment, when I use the same configuration as above no error occurs:
rye run python
>>> import torch
>>>
(Update):
rye 0.6.0
commit: unknown (1731a5b37 2023-06-01)
platform: macos (aarch64)
self-python: cpython@3.10
symlink support: true
i repro in my machine(20.04.1-Ubuntu
), current not find the solution.
@CharlesChen0823 can you paste the output of rye --version
?
i repro with latest version
rye 0.6.0 commit: 0.5.0+93 (53cf0df44 2023-06-02) platform: linux (x86_64) self-python: cpython@3.10 symlink support: true
with the error exception
charles@charles:~/program/python/test_nvidia$ rye run python
Python 3.8.16 (default, Dec 21 2022, 04:00:16)
[Clang 14.0.3 ] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
Traceback (most recent call last):
File "/home/charles/program/python/test_nvidia/.venv/lib/python3.8/site-packages/torch/__init__.py", line 168, in _load_global_deps
ctypes.CDLL(lib_path, mode=ctypes.RTLD_GLOBAL)
File "/home/charles/.rye/py/cpython@3.8.16/install/lib/python3.8/ctypes/__init__.py", line 373, in __init__
self._handle = _dlopen(self._name, mode)
OSError: libcurand.so.10: 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/charles/program/python/test_nvidia/.venv/lib/python3.8/site-packages/torch/__init__.py", line 228, in <module>
_load_global_deps()
File "/home/charles/program/python/test_nvidia/.venv/lib/python3.8/site-packages/torch/__init__.py", line 189, in _load_global_deps
_preload_cuda_deps(lib_folder, lib_name)
File "/home/charles/program/python/test_nvidia/.venv/lib/python3.8/site-packages/torch/__init__.py", line 154, 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 ['', '/home/charles/.rye/py/cpython@3.8.16/install/lib/python38.zip', '/home/charles/.rye/py/cpython@3.8.16/install/lib/python3.8', '/home/charles/.rye/py/cpython@3.8.16/install/lib/python3.8/lib-dynload', '/home/charles/program/python/test_nvidia/.venv/lib/python3.8/site-packages', '/home/charles/program/python/test_nvidia/src']
When installing encodec, I wanted to install it in CPU-only mode due to lack of an
nvidia
processor on my local machine. It required going through the generated lock file and manually excluding around 10 nvidia dependencies, even when custom indices have been added. The indice resolution should happen before the dependency locking step.It was not sufficient to blacklist nvidia dependencies. When the
import torch
command was given to the python interpreter, the following error occured: