python 3.x - Import Error: No module name -


i facing issue while importing class. folder structure below:

python_space   |_ __init__.py   |_ ds_tut      |_ __init__.py      |_ stacks         |_ __init__.py         |_ stacks.py  (contains class stack)      |_ trees         |_ __init__.py         |_ parsetree.py (wants import stack class above) 

used following code import:

from stacks.stacks import stack 

getting following error:

"importerror: no module named stacks.stacks" 

stacks inside ds_tut module. work?

from ds_tut.stacks.stacks import stack 

Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -