microsoft / vscode-jupyter

VS Code Jupyter extension
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
MIT License
1.3k stars 292 forks source link

DLL not loading in Jupyter Extension VS Code #16039

Open SahithiPriyaV opened 3 months ago

SahithiPriyaV commented 3 months ago

Please find the System Information

  1. Python Version: Python 3.11.9
  2. Visual Studio Code : 1.92.1
  3. Jupyter Extension: 2024.7.0
  4. Python Packages:

    absl-py 2.1.0 addict 2.4.0 albucore 0.0.13 albumentations 1.4.13 annotated-types 0.7.0 anyio 4.4.0 asttokens 2.4.1 basicsr 1.4.2 certifi 2024.7.4 charset-normalizer 3.3.2 click 8.1.7 colorama 0.4.6 coloredlogs 15.0.1 comm 0.2.2 contourpy 1.2.1 cycler 0.12.1 Cython 3.0.11 debugpy 1.8.5 decorator 5.1.1 diffusers 0.30.0 easydict 1.13 eval_type_backport 0.2.0 executing 2.0.1 facexlib 0.3.0 fastapi 0.112.0 filelock 3.15.4 filterpy 1.4.5 flatbuffers 24.3.25 fonttools 4.53.1 fsspec 2024.6.1 future 1.0.0 gfpgan 1.3.8 grpcio 1.65.4 h11 0.14.0 huggingface-hub 0.24.5 humanfriendly 10.0 idna 3.7 imageio 2.35.0 importlib_metadata 8.2.0 insightface 0.7.3 ipykernel 6.29.5 ipython 8.26.0 jedi 0.19.1 Jinja2 3.1.4 joblib 1.4.2 jupyter_client 8.6.2 jupyter_core 5.7.2 kiwisolver 1.4.5 lazy_loader 0.4 llvmlite 0.43.0 lmdb 1.5.1 Markdown 3.6 MarkupSafe 2.1.5 matplotlib 3.9.2 matplotlib-inline 0.1.7 mpmath 1.3.0 nest-asyncio 1.6.0 networkx 3.3 numba 0.60.0 numpy 1.26.4 onnx 1.16.2 opencv-python 4.10.0.84 opencv-python-headless 4.10.0.84 packaging 24.1 parso 0.8.4 pillow 10.4.0 pip 24.2 platformdirs 4.2.2 prettytable 3.11.0 prompt_toolkit 3.0.47 protobuf 5.27.3 psutil 6.0.0 pure_eval 0.2.3 pydantic 2.8.2 pydantic_core 2.20.1 Pygments 2.18.0 pyparsing 3.1.2 pyreadline3 3.4.1 python-dateutil 2.9.0.post0 pywin32 306 PyYAML 6.0.2 pyzmq 26.1.0 realesrgan 0.3.0 regex 2024.7.24 requests 2.32.3 safetensors 0.4.4 scikit-image 0.24.0 scikit-learn 1.5.1 scipy 1.14.0 setuptools 65.5.0 six 1.16.0 sniffio 1.3.1 stack-data 0.6.3 starlette 0.37.2 sympy 1.13.2 tb-nightly 2.18.0a20240812 tensorboard-data-server 0.7.2 threadpoolctl 3.5.0 tifffile 2024.8.10 tomli 2.0.1 torch 2.0.0 torchvision 0.15.1 tornado 6.4.1 tqdm 4.66.5 traitlets 5.14.3 typing_extensions 4.12.2 urllib3 2.2.2 uvicorn 0.30.5 wcwidth 0.2.13 Werkzeug 3.0.3 yapf 0.40.2 zipp 3.20.0

    Error Received:

ImportError Traceback (most recent call last) Cell In[1], line 1 ----> 1 import insightface

File c:\Users\sahit\AppData\Local\Programs\Python\Python311\Lib\site-packages\insightface__init.py:16 10 raise ImportError( 11 "Unable to import dependency onnxruntime. " 12 ) 14 version__ = '0.7.3' ---> 16 from . import model_zoo 17 from . import utils 18 from . import app

File c:\Users\sahit\AppData\Local\Programs\Python\Python311\Lib\site-packages\insightface\model_zoo__init__.py:1 ----> 1 from .model_zoo import get_model 2 from .arcface_onnx import ArcFaceONNX 3 from .retinaface import RetinaFace

File c:\Users\sahit\AppData\Local\Programs\Python\Python311\Lib\site-packages\insightface\model_zoo\model_zoo.py:11 9 import glob 10 import onnxruntime ---> 11 from .arcface_onnx import 12 from .retinaface import 13 #from .scrfd import * ... (...) 111 Version, 112 )

ImportError: DLL load failed while importing onnx_cpp2py_export: A dynamic link library (DLL) initialization routine failed. Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings... Traceback (most recent call last): File "C:\Users\sahit\AppData\Local\Temp\ipykernel_4104\1052844006.py", line 3, in

Description: The above code line working in Powershell and python simple test.py but not working in Jupter notebook extension in VS Code.

Not able to reproduce this even after upgrading the Latest Microsoft Visual C++ Redistributable Version Tools: https://aka.ms/vs/17/release/vc_redist.x64.exe

Is any DLL supposed to be add, but kernel is already set to existing Python environment. No virtual environment created, using system python version of 3.11. Any change in configuration or so required, could you provide if any details.

Any help is much appreciated , thanks :-)