简体   繁体   English

Jupyter Notebook 找不到 Anaconda openccv 模块

[英]Jupyter Notebook not finding Anaconda openccv module

I'm using Anaconda to manage a python environment, and running a Jupyter Notebook from it.我正在使用 Anaconda 来管理 python 环境,并从中运行 Jupyter Notebook。 I've installed nb_conda and nb_conda_kernels, and opencv is listed among the installed conda packages when I view them from the Conda tab of the Jupyter Notebook.我已经安装了 nb_conda 和 nb_conda_kernels,当我从 Jupyter Notebook 的 Conda 选项卡查看 opencv 时,它们会列在已安装的 conda 包中。 Despite this, when I run the notebook and it goes through the imports,尽管如此,当我运行笔记本并通过导入时,

import os
import sys
import random
import math
import re
import time
import numpy as np
import opencv

it hits a ModuleNotFoundError: No module named 'opencv'它遇到 ModuleNotFoundError: No module named 'opencv'

I have set the notebook to use the conda environment that has opencv installed, and opencv is listed among the installed packages in the "conda packages" section of the kernel tab in the notebook.我已将笔记本设置为使用安装了 opencv 的 conda 环境,并且 opencv 列在笔记本中 kernel 选项卡的“conda 包”部分的已安装包中。 And yet it still can't find opencv for some reason when I try to run the cells in the notebook.然而,当我尝试在笔记本电脑中运行单元格时,由于某种原因,它仍然找不到 opencv。

If it is relevant, I also have ipykernel installed on the same environment.如果相关,我也在同一环境中安装了 ipykernel。 The notebook also appears to not be finding any available conda packages for download when I open up the Conda Packages section of the kernel tab.当我打开 kernel 选项卡的 Conda 包部分时,笔记本似乎也没有找到任何可用的 conda 包可供下载。

I'm new to using conda, and this is my first time trying to combine it with Jupyter Notebook.我是使用 conda 的新手,这是我第一次尝试将它与 Jupyter Notebook 结合使用。 How can I get the notebook to use the opencv package that is installed?如何让笔记本使用安装的 opencv package?

@cel found the issue, it was fixed by running %conda install opencv first @cel 发现问题,通过运行%conda install opencv先修复

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用anaconda和jupyter笔记本在python中安装模块 - Installing module in python with anaconda and jupyter notebook jupyter笔记本找不到绝对安装的python模块 - jupyter notebook not finding python module that is definitely installed 运行 Jupyter Notebook 时在 Anaconda 环境中查找依赖项时出错 - Error finding dependencies in Anaconda environment when running Jupyter notebook Jupyter Notebook 未启动(Anaconda) - Jupyter Notebook not launching (Anaconda) 未安装Anaconda / jupyter的笔记本 - notebook not installed with anaconda/jupyter Keras导入错误:Jupyter Notebook Anaconda没有名为“ google”的模块 - Keras Import Error: No module named 'google', Jupyter Notebook Anaconda anaconda 中的 biopython,而不是 jupyter notebook - biopython in anaconda, not jupyter notebook 安装了Anaconda3,jupyter笔记本电脑出现错误,没有名为“ pyspark”的模块 - Anaconda3 is installed, jupyter notebook errors out No module named 'pyspark' ModuleNotFoundError:没有名为“webbrowser”的模块 - Anaconda - Jupyter Notebook - MacOS - ModuleNotFoundError: No module named 'webbrowser' - Anaconda - Jupyter Notebook - MacOS 错误:没有这样的模块:fts4; 使用 - 带有 anaconda jupyter 笔记本的模糊匹配器包 - error: no such module: fts4; using - fuzzymatcher package with anaconda jupyter notebook
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM