2

I installed the ema workbench with

pip install ema_workbench 

and would like to import some module:

from ema_workbench import Model

If I run this in Jupyter notebook or Spyder, it works fine. If I try to run this in Eclipse PyDev 7.1.0.201902031515 , I get following warning:

D:\EclipsePython\App\WinPython\python-3.7.1.amd64\lib\importlib\_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
  return f(*args, **kwds)

I thought that my PyDev settings for the Python Interpreter might be wrong. However, the ema_workbench is listed as installed package and the settings seem to be fine ?!

=>How can I fix that annoying warning?

=>Is this a PyDev issue or an issue of the ema_workbench (that is just not shown for Jupyter and Spyder??)

Related questions:

enter image description here

edit

I tried to add

-W ignore:ImportWarning

to the "JVM Arguments" of the python run configuration.

I also tried to put following code on the beginning:

import warnings
warnings.filterwarnings('ignore', category=ImportWarning)

Did not work...

Stefan
  • 10,010
  • 7
  • 61
  • 117

1 Answers1

-4

Too my knowledge it is an eclipse / pydev issue related to changes in the import system of python. Just google the message and see the many discussions related to it.

  • I created a corresponding PyDev bug ticket: https://www.brainwy.com/tracker/PyDev/986 – Stefan Mar 28 '19 at 12:19
  • 5
    I googled the message and this was the top result. Goes to show that "Just google the message" is not a useful answer. – gerrit Mar 05 '20 at 12:36