microsoft / vscode-jupyter

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

Ipykernel working tool slow and not show result in Jupyter Notebook #8281

Closed chuongmep closed 2 years ago

chuongmep commented 2 years ago

I have this problem when I upgrade vs code to new version

Steps to Reproduce:

1.Try with some code

from mtcnn import MTCNN
import cv2
from skimage import io
import matplotlib.pyplot as plt
img = io.imread("people.jpg")
plt.imshow(img)
# detect faces in the image
results = detector.detect_faces(img)
results
detector = MTCNN()
# show results
for i in range(len(results)):
    x1, y1, width, height = results[i]['box']
    x2, y2 = x1 + width, y1 + height
    cv2.rectangle(img, (x1, y1), (x2, y2), (0, 255, 0), 2)
# show the image
plt.imshow(img)
  1. It runs too slow in show result and show something image
rchiodo commented 2 years ago

Thanks for the bug. It sounds like the kernel crashed.

Can you include the contents of the 'Jupyter' output panel?

image

chuongmep commented 2 years ago

Sure, you can check error.txt LogRunAll.txt Package Version


absl-py 0.14.1 aiohttp 3.7.4.p amqp 5.0.6 ann-visualizer 2.5 anyio 3.3.3 argon2-cffi 21.1.0 arrow 1.2.0 asttokens 2.0.5 astunparse 1.6.3 async-timeout 3.0.1 atoti 0.6.2 attrs 21.2.0 Babel 2.9.1 backcall 0.2.0 beautifulsoup4 4.10.0 bezier 2021.2. billiard 3.6.4.0 binaryornot 0.4.4 biopython 1.79 bleach 4.1.0 bokeh 2.4.0 bs4 0.0.1 cachetools 4.2.4 celery 5.1.2 certifi 2021.5. cffi 1.14.6 chardet 4.0.0 charset-normalizer 2.0.4 clang 5.0 click 7.1.2 click-default-group 1.2.2 click-didyoumean 0.3.0 click-plugins 1.1.1 click-repl 0.2.0 cligj 0.7.2 cloup 0.7.1 cmake 3.21.2 colorama 0.4.4 colour 0.1.5 commonmark 0.9.1 cookiecutter 1.7.3 cycler 0.10.0 Cython 0.29.24 d3fdgraph 0.34 dataclasses-json 0.5.6 debugpy 1.4.3 decorator 5.1.0 defusedxml 0.7.1 descartes 1.1.0 dill 0.3.4 discord 1.7.3 discord.py 1.7.3 dlib 19.22.1 docopt 0.6.2 docutils 0.15.2 entrypoints 0.3 et-xmlfile 1.1.0 executing 0.8.2 face-recognition-models 0.3.0 Facebook-Friend-Photos-Download 1.0.0 facebook-sdk 3.1.0 fastapi 0.70.0 ffmpeg 1.4 findspark 1.4.2 Fiona 1.8.20 flatbuffers 1.12 flickrapi 2.4.0 gast 0.4.0 GDAL 3.3.2 geopandas 0.10.1 glcontext 2.3.4 google-api-core 2.1.0 google-api-python-client 2.24.0 google-auth 1.35.0 google-auth-httplib2 0.1.0 google-auth-oauthlib 0.4.6 google-images-download 2.8.0 google-pasta 0.2.0 googleapis-common-protos 1.53.0 graphframes 0.6 graphviz 0.17 grpcio 1.41.0 h5py 3.1.0 httplib2 0.20.1 icecream 2.1.1 idna 3.2 imageio 2.10.3 imbalanced-learn 0.8.0 imblearn 0.0 import-ipynb 0.1.3 importlib-metadata 4.8.1 ipykernel 6.4.1 ipython 7.24.1 ipython-genutils 0.2.0 ipywidgets 7.6.5 isodate 0.6.0 jdk4py 11.0.9. jedi 0.18.0 Jinja2 3.0.2 jinja2-time 0.2.0 jmespath 0.10.0 joblib 1.0.1 Js2Py 0.71 json5 0.9.6 jsonpickle 2.0.0 jsonschema 4.0.1 jupyter 1.0.0 jupyter-client 6.1.12 jupyter-console 6.4.0 jupyter-core 4.7.1 jupyter-server 1.11.1 jupyterlab 3.1.18 jupyterlab-code-formatter 1.4.10 jupyterlab-pygments 0.1.2 jupyterlab-server 2.8.2 jupyterlab-widgets 1.0.2 keras 2.7.0 Keras-Preprocessing 1.1.2 kiwisolver 1.3.1 kombu 5.1.0 libclang 12.0.0 lxml 4.6.3 manim 0.10.0 ManimPango 0.3.0 mapbox-earcut 0.12.10 Markdown 3.3.4 MarkupSafe 2.0.1 marshmallow 3.13.0 marshmallow-enum 1.5.1 matplotlib 3.4.2 matplotlib-inline 0.1.2 mistune 0.8.4 mlxtend 0.18.0 moderngl 5.6.4 moderngl-window 2.4.0 mpmath 1.2.1 mtcnn 0.1.1 multidict 5.1.0 multipledispatch 0.6.0 multiprocess 0.70.12 munch 2.5.0 mypy-extensions 0.4.3 nbclassic 0.3.2 nbclient 0.5.4 nbconvert 6.2.0 nbformat 5.1.3 nest-asyncio 1.5.1 networkx 2.6.2 nltk 3.6.3 nose 1.3.7 notebook 6.4.4 numpy 1.21.3 oauthlib 3.1.1 opencv-contrib-python 4.5.3.5 opencv-python 4.5.3.5 openpyxl 3.0.7 opt-einsum 3.3.0 osmnx 1.0.1 p5py 1.0.0 packaging 21.0 pandas 1.3.3 pandocfilters 1.5.0 parso 0.8.2 patsy 0.5.1 pdbr 0.6.3 pep517 0.11.0 pickleshare 0.7.5 Pillow 8.4.0 pip 21.3.1 pipwin 0.5.1 plyer 2.0.0 pmdarima 1.8.2 pnoise 0.1.0 poyo 0.5.0 prettymaps 0.1.2 progressbar2 2.7.3 prometheus-client 0.11.0 prompt-toolkit 3.0.18 protobuf 3.18.1 pwf 0.2.0 py4j 0.10.9 pyarrow 4.0.1 pyasn1 0.4.8 pyasn1-modules 0.2.8 pycairo 1.20.1 pycparser 2.20 pydantic 1.8.2 pydotplus 2.0.2 pydub 0.25.1 pyglet 1.5.19 Pygments 2.9.0 pyinsights 0.1.3 pyjsparser 2.7.1 pynput 1.7.4 pyparsing 2.4.7 PyPrind 2.11.3 pyproj 3.2.1 PyQt5 5.15.4 PyQt5-Qt5 5.15.2 PyQt5-sip 12.9.0 pyreadline 2.1 pyrr 0.10.3 pyrsistent 0.18.0 PySide2 5.15.2 pySmartDL 1.3.4 PySocks 1.7.1 pyspark 3.1.2 pytesseract 0.3.8 python-dateutil 2.8.1 python-dotenv 0.19.1 python-facebook-api 0.11.2 python-slugify 5.0.2 python-youtube 0.8.1 pytrends 4.7.3 pytube 11.0.1 pytz 2021.1 pyvis 0.1.9 PyWavelets 1.1.1 pywin32 301 pywinpty 1.1.4 PyYAML 5.4.1 pyzmq 22.1.0 qasync 0.15.0 qtconsole 5.1.1 QtPy 1.11.2 regex 2021.9. requests 2.26.0 requests-oauthlib 1.3.0 requests-toolbelt 0.9.1 requests-unixsocket 0.2.0 rich 10.9.0 river 0.8.0 rsa 4.7.2 Rtree 0.9.7 scikit-image 0.18.3 scikit-learn 0.24.2 scipy 1.7.0 screeninfo 0.6.7 seaborn 0.11.1 selenium 3.141.0 Send2Trash 1.8.0 setuptools 51.3.3 Shapely 1.7.1 shiboken2 5.15.2 six 1.16.0 sklearn 0.0 sniffio 1.2.0 soupsieve 2.2.1 srapy 0.1.19 starlette 0.16.0 statsmodels 0.12.2 style 1.1.0 svgelements 1.5.4 svgwrite 1.4.1 sympy 1.9 tabulate 0.8.9 tensorboard 2.6.0 tensorboard-data-server 0.6.1 tensorboard-plugin-wit 1.8.0 tensorflow 2.7.0 tensorflow-estimator 2.7.0 tensorflow-io-gcs-filesystem 0.22.0 termcolor 1.1.0 terminado 0.12.1 testpath 0.5.0 text-unidecode 1.3 textblob 0.15.3 threadpoolctl 2.2.0 tifffile 2021.11 tk 0.1.0 toml 0.10.2 tomli 1.2.1 tornado 6.1 tqdm 4.62.2 traitlets 5.1.1 tweepy 4.1.0 typeguard 2.13.0 typing-extensions 3.7.4.3 typing-inspect 0.7.1 tzdata 2021.2. tzlocal 3.0 update 0.0.1 uritemplate 3.0.1 urllib3 1.25.11 vine 5.0.0 vpype 1.7.0 vsketch 1.0.0a0 watchdog 2.1.5 watchgod 0.7 wcwidth 0.2.5 webencodings 0.5.1 websocket-client 1.2.1 websockets 10.0 Werkzeug 2.0.2 wheel 0.37.0 widgetsnbextension 3.5.1 wordcloud 1.8.1 wrapt 1.12.1 xgboost 1.4.2 xlrd 2.0.1 yarl 1.6.3 youtube-data-api 0.0.21 youtube-dl 2021.6. zipp 3.6.0

chuongmep commented 2 years ago

I want to inform you about this, I have removed Cuda 11.5, CudaDNN and reinstalled 11.4, also I reinstalled python IDE, they work for me now.

rchiodo commented 2 years ago

Thanks for the information. Your kernel definitely died (can see it in the output here:)

{"jsonrpc": "2.0", "method": "log", "params": {"level": "WARNING", "msg": "Kernel has exited with exit code 3221226505, ", "pid": 11876}}
Warn 2021-11-17 09:52:57: Python Daemon (pid: 11876): Kernel has exited with exit code 3221226505, 
Info 2021-11-17 09:52:57: KernelProcess output: Content-Length: 94
Content-Type: application/vscode-jsonrpc; charset=utf8

Glad that it's working now.