ModuleNotFoundError: No module named 'eikon'

I'm currently following the quick guides for setting up the API, and I have ran into a small issue that I can't figure out. I would be very grateful if I can get some help resolving this.

This is the code I'm running, which is just from the guide:
1650635318265.png


Here's the full terminal output:

(base) PS C:\Users\user\Miniconda3\envs\refinitiv>  & 'C:\Users\user\Miniconda3\envs\refinitiv\python.exe' 'c:\Users\user\.vscode\extensions\ms-python.python-2022.4.1\pythonFiles\lib\python\debugpy\launcher' '57854' '--' 'c:\Users\user\Miniconda3\envs\refinitiv\APItest2.py'
Traceback (most recent call last):
  File "C:\Users\user\Miniconda3\envs\refinitiv\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\user\Miniconda3\envs\refinitiv\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "c:\Users\user\.vscode\extensions\ms-python.python-2022.4.1\pythonFiles\lib\python\debugpy\__main__.py", line 45, in <module>
    cli.main()
  File "c:\Users\user\.vscode\extensions\ms-python.python-2022.4.1\pythonFiles\lib\python\debugpy/..\debugpy\server\cli.py", line 444, in main
    run()
\server\cli.py", line 285, in run_file
     runpy.run_path(target_as_str, run_name=compat.force_str("__main__"))
  File "C:\Users\user\Miniconda3\envs\refinitiv\lib\runpy.py", line 269, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "C:\Users\user\Miniconda3\envs\refinitiv\lib\runpy.py", line 96, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "C:\Users\user\Miniconda3\envs\refinitiv\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "c:\Users\user\Miniconda3\envs\refinitiv\APItest2.py", line 1, in <module>
    import eikon as ek
ModuleNotFoundError: No module named 'eikon'


Here's the result of 'pip list' in the same directory:

Package                Version
---------------------- ---------
anyio                  3.5.0
appdirs                1.4.4
argon2-cffi            21.3.0
argon2-cffi-bindings   21.2.0
asttokens              2.0.5
attrs                  21.4.0
backcall               0.2.0
beautifulsoup4         4.10.0
bleach                 4.1.0
Bottleneck             1.3.4
brotlipy               0.7.0
certifi                2021.10.8
cffi                   1.15.0
chardet                3.0.4
charset-normalizer     2.0.4
colorama               0.4.4
conda                  4.12.0
conda-package-handling 1.8.1
cryptography           36.0.0
cycler                 0.11.0
DateTime               4.4
debugpy                1.5.1
decorator              5.1.1
defusedxml             0.7.1
deprecation            2.1.0
eikon                  1.1.14
entrypoints            0.4
executing              0.8.3
fastjsonschema         2.15.1
fonttools              4.25.0
h11                    0.12.0
h2                     3.2.0
hpack                  3.0.0
httpcore               0.14.7
httpx                  0.22.0
hyperframe             5.2.0
idna                   2.10
ipykernel              6.9.1
ipython                8.2.0
ipython-genutils       0.2.0
ipywidgets             7.6.5
jedi                   0.18.1
Jinja2                 3.0.3
jsonschema             4.4.0
jupyter                1.0.0
jupyter-client         7.1.2
jupyter-console        6.4.3
jupyter-core           4.9.2
jupyterlab-pygments    0.1.2
jupyterlab-widgets     1.0.0
kiwisolver             1.3.2
MarkupSafe             2.0.1
matplotlib             3.5.1
matplotlib-inline      0.1.2
menuinst               1.4.18
mistune                0.8.4
mkl-fft                1.3.1
mkl-random             1.2.2
mkl-service            2.4.0
munkres                1.1.4
nbclient               0.5.11
nbconvert              6.4.4
nbformat               5.3.0
nest-asyncio           1.5.5
notebook               6.4.8
numexpr                2.8.1
numpy                  1.21.5
packaging              21.3
pandas                 1.4.1
pandocfilters          1.5.0
parso                  0.8.3
pickleshare            0.7.5
Pillow                 9.0.1
pip                    21.2.4
prometheus-client      0.13.1
prompt-toolkit         3.0.20
pure-eval              0.2.2
pycosat                0.6.3
pycparser              2.21
Pygments               2.11.2
pyOpenSSL              22.0.0
pyparsing              3.0.4
pyrsistent             0.18.0
PySocks                1.7.1
python-dateutil        2.8.2
pytz                   2021.3
pywin32                302
pywinpty               2.0.2
pyzmq                  22.3.0
qtconsole              5.3.0
QtPy                   2.0.1
requests               2.27.1
rfc3986                1.5.0
ruamel-yaml-conda      0.15.100
Send2Trash             1.8.0
setuptools             61.2.0
sip                    4.19.13
six                    1.16.0
sniffio                1.2.0
soupsieve              2.3.1
stack-data             0.2.0
terminado              0.13.1
testpath               0.5.0
tornado                6.1
tqdm                   4.63.0
traitlets              5.1.1
typing_extensions      4.1.1
urllib3                1.26.8
wcwidth                0.2.5
webencodings           0.5.1
websocket-client       1.3.2
wheel                  0.37.1
widgetsnbextension     3.5.2
win-inet-pton          1.1.0
wincertstore           0.2
zope.interface         5.4.0
Tagged:

Best Answer

  • wasin.w
    wasin.w admin
    Answer ✓

    Hello @nathen.gildow

    I noticed that your active Conda is the base environment but your code is in the refinitiv environment.

    conda-logs.png

    Which Conda environment you have installed the Eikon Data API? If you have installed Eikon Data API library in the refinitiv environment, please change the active Conda environment to be refinitiv and re-test.

    (base) $> conda activate refinitiv
    (refinitive) $> python APITest2.py

    You can press the F1 button and select the "Python: Select Interpreter" option to choose the Conda's refinitiv environment in VS Code.

    conda-vs-code.png


Answers