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
{
"name": "OSError",
"message": "[WinError 126] The specified module could not be found. Error loading "C:\Users\tromp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\torch\lib\shm.dll" or one of its dependencies.",
"stack": "---------------------------------------------------------------------------
OSError Traceback (most recent call last)
Cell In[2], line 1
----> 1 import easyocr
2 reader = easyocr.Reader(['en'])
File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\easyocr\init.py:1
----> 1 from .easyocr import Reader
3 version = '1.7.1'
File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\easyocr\recognition.py:2
1 from PIL import Image
----> 2 import torch
3 import torch.backends.cudnn as cudnn
4 import torch.utils.data
File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\torch\init.py:141
139 err = ctypes.WinError(ctypes.get_last_error())
140 err.strerror += f' Error loading "{dll}" or one of its dependencies.'
--> 141 raise err
143 kernel32.SetErrorMode(prev_error_mode)
146 def _preload_cuda_deps(lib_folder, lib_name):
OSError: [WinError 126] The specified module could not be found. Error loading "C:\Users\tromp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\torch\lib\shm.dll" or one of its dependencies."
}
/
The text was updated successfully, but these errors were encountered:
The error you’re encountering indicates that there is a missing or corrupted dependency for the torch library, specifically the shm.dll file.
possible causes:-
Ensure All Dependencies are Installed
Update Your Environment
Check for Missing DLL Files
Reinstalling PyTorch with CUDA or CPU-only Versions
Verify Your Python Environment
python -m venv myenv
myenv\Scripts\activate # On Windows
# myenv/bin/activate # On MacOS/Linux
pip install easyocr
pip install torch
Check for Conflicting Software
Ensure that there are no software conflicts, such as multiple versions of Python or other packages that might interfere.
After performing these steps, try running your code again:
{
"name": "OSError",
"message": "[WinError 126] The specified module could not be found. Error loading "C:\Users\tromp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\torch\lib\shm.dll" or one of its dependencies.",
"stack": "---------------------------------------------------------------------------
OSError Traceback (most recent call last)
Cell In[2], line 1
----> 1 import easyocr
2 reader = easyocr.Reader(['en'])
File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\easyocr\init.py:1
----> 1 from .easyocr import Reader
3 version = '1.7.1'
File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\easyocr\easyocr.py:3
1 # -- coding: utf-8 --
----> 3 from .recognition import get_recognizer, get_text
4 from .utils import group_text_box, get_image_list, calculate_md5, get_paragraph,\
5 download_and_unzip, printProgressBar, diff, reformat_input,\
6 make_rotated_img_list, set_result_with_confidence,\
7 reformat_input_batched, merge_to_free
8 from .config import *
File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\easyocr\recognition.py:2
1 from PIL import Image
----> 2 import torch
3 import torch.backends.cudnn as cudnn
4 import torch.utils.data
File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\torch\init.py:141
139 err = ctypes.WinError(ctypes.get_last_error())
140 err.strerror += f' Error loading "{dll}" or one of its dependencies.'
--> 141 raise err
143 kernel32.SetErrorMode(prev_error_mode)
146 def _preload_cuda_deps(lib_folder, lib_name):
OSError: [WinError 126] The specified module could not be found. Error loading "C:\Users\tromp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\torch\lib\shm.dll" or one of its dependencies."
}
/
The text was updated successfully, but these errors were encountered: