Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #93713
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Subject | Re: Python Error: ImportError: No module named ''folder_name’ at Command Prompt |
| Date | 2015-07-11 20:02 -0400 |
| References | <CANutusz_o3cQNfoDDqgV=K8fai44rAL6QyCk3z8NC3FRRPNQdg@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.439.1436659384.3674.python-list@python.org> (permalink) |
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 comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Python Error: ImportError: No module named ''folder_name’ at Command Prompt Terry Reedy <tjreedy@udel.edu> - 2015-07-11 20:02 -0400
csiph-web