为什么jupyter说No module named 'cv2'
时间: 2023-09-15 16:18:06 浏览: 254
jupyter notebook中报错"No module named 'cv2'"的原因可能是由于jupyter notebook的kernel问题导致的。你可以使用命令"jupyter kernelspec list"来查看所有的内核。如果只有一个base内核,就容易出现这种问题。解决办法是新建一个内核,可以使用以下命令:python -m ipykernel install --user --name Vision --display-name "Python (Vision)"。这样就可以在jupyter notebook中使用import cv2了。另外,你也可以尝试使用pip install命令来安装opencv库,比如"pip install opencv-python"。这样可以确保你在jupyter notebook中能够成功导入cv2模块。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [jupyter notebook 中报错 ModuleNotFoundError: No module named cv2](https://blog.csdn.net/uncle_ll/article/details/116211917)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [jupyter中import cv2出现No module named cv2解决办法](https://blog.csdn.net/m0_53065609/article/details/117126994)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文