Re: Fwd: Python Error: ImportError: No module named ''folder_name’ at Command Prompt

Vincent Vande Vyvre vincent.vande.vyvre at
Sun Jul 12 07:50:57 CEST 2015

Le 12/07/2015 06:02, Ernest Bonat, Ph.D. a écrit :
> Thanks for your help. I had follow the link: How to add a Python module
> to syspath?
> <>
> and I could not make it work. I did use sys.path.insert() and
> sys.path.append() as:
> Examples: sys.path.append('/python_mvc_calculator/calculator/') or
> sys.path.insert(0, "/python_mvc_calculator/calculator")
> I did try it to:
> sys.path.append('/python_mvc_calculator/calculator/controller') or
> sys.path.insert(0, "/python_mvc_calculator/calculator/controller") too!
> The file is in python_mvc_calculator/calculator folder and I
> need to import a module in
> "python_mvc_calculator/calculator/controller"
> I hope this explanation helps a bit!
> <>
> Thanks

If "/python_mvc_calculator/calculator/controller" is a folder and if you 
have a file into this folder, you have to use:

sys.path.insert(0, "/python_mvc_calculator/calculator/controller")
from calculatorcontroller import foo # or import calculatorcontroller

But the init file must be named NOT as sayed in 


More information about the Python-list mailing list