First my folder structure(didn't show some of the unnecessary files or folders):
pythonLeaning
|Debug
|PythonLearning
|Library
| |cameo.py
| |managers.py
|
|SciPy_etc
|OpenCV.py
In the cameo.py
, I have:
from managers import WindowManager, CaptureManager
And it works well.
But if I import these 2 file in OpenCV.py
:
import managers
import cameo
I'll get this:
Traceback (most recent call last):
File "C:\Amarth\Computer_Graphics\Programing\PythonLearning\PythonLearning\SciPy_etc\OpenCV.py", line 7, in <module>
import managers
ImportError: No module named 'managers'
Visual Studio doesn't show any real-time error in the window, like red underline or something. And it can auto-complete the class or function name in managers
and cameo
, in which case I thinks indicates the success of the import
.
Then what's the problem?
================Update 1=================
I thought I don't need managers.py
since it is only used in cameo.py
, so I deleted import managers
, only left import cameo
, now I get this:
Traceback (most recent call last):
File "C:\Amarth\Computer_Graphics\Programing\PythonLearning\PythonLearning\SciPy_etc\OpenCV.py", line 8, in <module>
import cameo
ImportError: No module named 'cameo'