python3.4中没有名为“xyz”的模块

2024-10-02 14:27:41 发布

您现在位置:Python中文网/ 问答频道 /正文

我是python新手,所以这可能是一个错误的问题。在

我的Python路径是“C:\ABC;C:\XY”

我有以下结构: structure

在install.py安装,有要导入的代码杂项.Utils1.py:

from MiscUtils import Utils1

但是在Utils1.py中,还有另一个代码可以导入Utils2.py:

^{pr2}$

当我执行install.py安装,我收到以下错误:

"No module named Utils2" 

我试了很多方法,但都没用。如果我在Utils1.py中输入以下内容:

from .UserUtils import Utils2

我得到"No Module named MiscUtils.UserUtils"

如何正确导入所有这些模块 ? 在


Tags: installno代码frompyimport路径错误