Код: Выделить всё
Py_Initialize();
PyRun_SimpleString("import sys");
PyRun_SimpleString("import easyocr");
//Other codes
Код: Выделить всё
Traceback (most recent call last):
File "", line 1, in
File "C:\Python311\Lib\site-packages\easyocr\__init__.py", line 1, in
from .easyocr import Reader
File "C:\Python311\Lib\site-packages\easyocr\easyocr.py", line 3, in
from .recognition import get_recognizer, get_text
File "C:\Python311\Lib\site-packages\easyocr\recognition.py", line 1, in
from PIL import Image
File "C:\Python311\Lib\site-packages\PIL\Image.py", line 100, in
from . import _imaging as core
ImportError: cannot import name '_imaging' from 'PIL' (C:\Python311\Lib\site-packages\PIL\__init__.py)
Код: Выделить всё
PyRun_SimpleString("from PIL import Image");
Код: Выделить всё
PyRun_SimpleString("import easyocr");
Код: Выделить всё
Traceback (most recent call last):
File "", line 1, in
File "C:\Python311\Lib\site-packages\PIL\Image.py", line 100, in
from . import _imaging as core
ImportError: cannot import name '_imaging' from 'PIL' (C:\Python311\Lib\site-packages\PIL\__init__.py)
Код: Выделить всё
Python 3.11.3 (tags/v3.11.3:f3909b8, Apr 4 2023, 23:49:59) [MSC v.1934 64 bit (AMD64)] on win32
Я уже загрузил отладочную версию символы через установщик Python и настройте конфигурацию отладки проекта на использование python311_d.lib.
Я хочу знать, почему он сообщает о такой ошибке и что мне делать для отладки эта программа в Visual Studio, спасибо.
Подробнее здесь: https://stackoverflow.com/questions/790 ... debug-mode