PyDev Interactive Console For Eclipse , Import Throws ImportError

- 1 answer

I have created a PythonProject in Eclipse Luna. I am trying to run python module via PyDev Interactive Console, but a simple import <ModuleName> does not work it throws the following error.

Traceback (most recent call last):

File "", line 1, in

File "C:\Users\SAMA0714\Downloads\eclipse\plugins\org.python.pydev_4.0.0.201504132356\pysrc\", line 21, in do_import module = self._system_import(name, *args, **kwargs)

ImportError: No module named first

I have changed the working directory of console via

import os

but still I face the same error. Generally when I do the import statement, If I type the first character of my module name I use to get the available modules with the name, but I do not see the names. I've look into various stackoverflow question, but none were appropriate. any help is appreciated. I have also tried running the console for the present editor option in the Eclipse Console Options, but in vain. But it works fine on Eclipse Kepler version.

UPDATEPyDev Interactive Console

enter image description here

Project Explorer

enter image description here

This is my on job system which is a 64-bit machine. I have a 32-bit machine at home on which python interactive console works smooth. On my home machine, I have had python on local drive c. On my job system I had installed it in documents folder which I now moved to C, but still the error persists.



The locations in which Python looks for modules are in sys.path which can also be modified. What output do you get when printing it?

import sys
print sys.path

You could try adding your path to sys.path:

import sys