python - Problems in importing self-defined packages and modules? -


i using spyder.

i have started building project. architecture shown.

enter image description here

as shown, have 2 packages, 1 of has module called trajectorygeneration now. both __init__.py files automatically generated. trying import module main.py, ended such error messages:

>>> generation import trajectorygeneration traceback (most recent call last):   file "<stdin>", line 1, in <module> importerror: no module named generation 

how may fix problem?

(spyder dev here) bug in spyder. not adding project's path pythonpath , that's why can't import project in console after open it. created issue , we'll fix in our next major release (i.e 2.3).

a workaround (as mentioned @jblasco) use our pythonpath manager add project's path yourself. after doing it, need open new console changes can take effect.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -