没有名为 'timeout_decorator' 的模块
No module named 'timeout_decorator'
我在尝试 import timeout_decorator
时遇到 No module named 'timeout_decorator'
这个奇怪的错误。我在我的虚拟环境中安装了 timeout-decorator==0.4.1
,我可以在 python 解释器中导入 timeout_decorator。但是当我 运行 pytest test.py 时,它抛出了这个错误。我有 pytest 版本 5.4.2
。有人有什么想法吗?
我想我的虚拟环境有一些问题,模块可能没有指向正确的系统路径。当 python 包在系统路径中时它起作用。
我在尝试 import timeout_decorator
时遇到 No module named 'timeout_decorator'
这个奇怪的错误。我在我的虚拟环境中安装了 timeout-decorator==0.4.1
,我可以在 python 解释器中导入 timeout_decorator。但是当我 运行 pytest test.py 时,它抛出了这个错误。我有 pytest 版本 5.4.2
。有人有什么想法吗?
我想我的虚拟环境有一些问题,模块可能没有指向正确的系统路径。当 python 包在系统路径中时它起作用。