!pip uninstall torch
!pip install torch --index-url https://download.pytorch.org/whl/cu121
Installing collected packages: torch Successfully installed torch-2.4.0+cu121
import torch
{"name": "OSError",
"message": "[WinError 126] The specified module could not be found. Error loading \"c:\\Users\\Noor\\anaconda3\\envs\\DL\\Lib\\site-packages\\torch\\lib\\fbgemm.dll\" or one of its dependencies.",
"stack": "---------------------------------------------------------------------------
OSError Traceback (most recent call last)
Cell In[4], line 1
----> 1 import torch
File c:\\Users\\Noor\\anaconda3\\envs\\DL\\Lib\\site-packages\\torch\\__init__.py:148
146 err = ctypes.WinError(ctypes.get_last_error())
147 err.strerror += f' Error loading \"{dll}\" or one of its dependencies.'
--> 148 raise err
150 kernel32.SetErrorMode(prev_error_mode)
153 def _preload_cuda_deps(lib_folder, lib_name):
OSError: [WinError 126] The specified module could not be found. Error loading \"c:\\Users\\Noor\\anaconda3\\envs\\DL\\Lib\\site-packages\\torch\\lib\\fbgemm.dll\" or one of its dependencies."
}
Solving Attempts :
1 - executing on a new conda envirnoment,
2 - installing using conda
3 - changing the python version
4 - uninstalling and re-installing anaconda then doing the above steps agani
5 - installing CUDA for my GPU
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Thu_Jun__6_03:03:05_Pacific_Daylight_Time_2024
Cuda compilation tools, release 12.5, V12.5.82
Build cuda_12.5.r12.5/compiler.34385749_0
6 - ensuring that c:\Users\Noor\anaconda3\envs\DL\Lib\site-packages\torch\lib\fbgemm.dll\ Is present
7 - some old solutinos propose adding lines to the torch_init_.py but I verified that those are already present in my init.py file
System Information :
GPU : RTX 2060
OS Name Microsoft Windows 10 Home
Version 10.0.19045 Build 19045
System Type x64-based PC
Platform Role Desktop
Finally: installing regular torch / torch+cpu works fine and imports
VersionsCollecting environment information...
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A
OS: Microsoft Windows 10 Home
GCC version: (Rev10, Built by MSYS2 project) 10.2.0
Clang version: Could not collect
CMake version: Could not collect
Libc version: N/A
Python version: 3.12.4 | packaged by Anaconda, Inc. | (main, Jun 18 2024, 15:03:56) [MSC v.1929 64 bit (AMD64)] (64-bit runtime)
Python platform: Windows-10-10.0.19045-SP0
Is CUDA available: N/A
CUDA runtime version: 12.5.82
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 2060
Nvidia driver version: 555.85
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A
CPU:
Architecture=9
CurrentClockSpeed=2904
DeviceID=CPU0
Family=205
L2CacheSize=1536
L2CacheSpeed=
Manufacturer=GenuineIntel
MaxClockSpeed=2904
Name=Intel(R) Core(TM) i5-9400F CPU @ 2.90GHz
ProcessorType=3
Revision=
Versions of relevant libraries:
[pip3] torch==2.4.0+cu121
[conda] torch 2.4.0+cu121 pypi_0 pypi
cc @ezyang @gchanan @zou3519 @kadeng @msaroufim @seemethere @malfet @osalpekar @atalman @peterjc123 @mszhanyi @skyline75489 @nbcsm @vladimir-aubrecht @iremyux @Blackhex @cristianPanaite
Ark-kun, saryeHaddadi, Kian0902, SashaBray, aligo-ash and 1 more
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4