ModuleNotFoundError:没有名为“ ipytest.magics”的模块

时间:2020-10-21 17:39:50

标签: python jupyter-notebook ipython

我是Jupyter笔记本电脑的新手,并且尝试运行以下代码:

import sys
!{sys.executable} -m pip install pytest
!{sys.executable} -m pip install ipytest

import ipytest.magics
import pytest

我遇到了ModuleError。上面的代码均未引起任何问题。这是什么原因造成的,我该怎么解决? (我的Python版本是3.7.4)

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题。我检查了ipytest ipytest document 0.9.1的最新文档,它改变了写作风格,所以我也改变了。你可以尝试

import ipytest
import pytest

ipytest.autoconfig()