I am using spyder and am getting an error when trying to import eikon. Could you tell me why?

Hi, i am currently working on spyder and am getting an error message (see below) when trying to import the module. I have already pip installed and pip upgraded it. My current installed eikon version is 1.0.1 and I also am working with the latest version of python. Could you tell me why and how to solve this issue?

runfile('C:/Users/xxxxxxxxspyder.py', wdir='C:/Users/xxxxx')
Traceback (most recent call last):

  File "<ipython-input-5-0c090ba1856d>", line 1, in <module>
    runfile('C:/Users/xxxxxxxxpy', wdir='C:/Users/xxxxxxxx')

  File "C:\Users\xxxxx\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 705, in runfile
    execfile(filename, namespace)

  File "C:\Users\xxxxxxx\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "C:/Users/xxxxxxxyder.py", line 2, in <module>
    import eikon as ek

ModuleNotFoundError: No module named 'eikon'

Best Answer

  • Hi,

    According to your description, if you can't import eikon, that means there is a mismatch between the Python distrib you manage in console (when you type "pip install xxx") and the Python version used by Spyder (check in Tools/PYTHONPATH manager and Tools/Preferences).


    image


    image