Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #93713 > unrolled thread
| Started by | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| First post | 2015-07-11 20:02 -0400 |
| Last post | 2015-07-11 20:02 -0400 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Python Error: ImportError: No module named ''folder_name’ at Command Prompt Terry Reedy <tjreedy@udel.edu> - 2015-07-11 20:02 -0400
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Date | 2015-07-11 20:02 -0400 |
| Subject | Re: Python Error: ImportError: No module named ''folder_name’ at Command Prompt |
| Message-ID | <mailman.439.1436659384.3674.python-list@python.org> |
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
Back to top | Article view | comp.lang.python
csiph-web