On 7/11/2015 11:15 AM, Ernest Bonat, Ph.D. wrote:
Hi All,


I’m doing a CSV data analysis in Python using Eclipse IDE/PyDev. I have
organized my project using the standard MVC architecture. In Eclipse IDE
everything is working properly. When I run my main.py file it at Command
Prompt I got an error: ImportError: No module named 'folder_name'. It’s
like the location path of the ‘'folder_name’ was not found. Do I need to
update my main.py file to run it at the Command Prompt?

'import module' searches directories on sys.path for a file or directory named 'module'. sys.path starts with '.', which represents the 'current' directory. If you start with the directory containing main.py as current directory and 'folder-name' is in the same directory, the import should work. Otherwise ??? EclipseIDE probably modifies the current dir and/or path to make things work.

For any more help, post the OS and locations of main.py, folder_name, and python.

--
Terry Jan Reedy


--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to