Import NumPy (from conda) to Komodo

I’ve been trying to import numpy into komodo but I haven’t been able to. I installed numpy and other libraries with Anaconda and have tried to add it to komodo from Preferences > Python 3 > Additional Python 3 Import Directories. The path I’m putting is the one I get from the console when looking for numpy, which is: c:\users\aquin\anaconda3\lib\site-packages, but when I try to import it in my code it says: ModuleNotFoundError: No module named ‘numpy’
I’m quite new with programming and get a little confused with directories and paths for packages so probably it’s a really simple fix, hope someone could help me up.

Morning @Agus_Rent,

That looks like an run time error. The Additional Dirs… preference is to tell Code Intel while you’re editing your code in Komodo.

The runtime error means either that 1. you haven’t told Komodo the correct Python to use or 2. you have a Python 2 file open instead of a Python 3.

  1. You can set that in the same preference window you set the “Additional Dirs” pref
  2. You can set the language in the file in the top right of the file view:
  • Carey

Hi @careyh, thanks for the answer!

Could there be any other reason for the issue? This is my screen from Komodo, and it seems like python 3 has always been the predetermined language.


What about the preference setting I mentioned? I guess I didn’t say specifically what the pref was called. I think it’s “Use this interpreter”.

To clarify; the reason you’re getting this error is because the Python interpreter install you’re using is not the same one you installed Numpy with, ie. you need to be using the c:\users\aquin\anaconda3\python.exe (that’s a guess at the path. I’m not sure what Anaconda’s directory structure looks like) interpreter if you installed Numpy with Anaconda.

  • Carey