ModuleNotFoundError: No module named 'theano' / working in ipython but not in VS code
Minjun-Bae opened this issue · comments
Hello everyone,
Hope everyone is doing well in this difficult situation.
I am a new coder at a very beginner level, and after a series of attempts for weeks, I THINK I have downloaded theano successfully via anaconda prompt.
The issue is, it works flawlessly in ipython, but not in VS code.
For example, a simple verification can be made by:
(base) C:\Users\MJ>ipython
Python 3.8.11 (default, Aug 6 2021, 09:57:55) [MSC v.1916 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 7.26.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import theano
In [2]: import theano.tensor as T
In [3]: x = T.scalar('x')
In [4]: y = T.scalar('y')
In [5]: z=x+y
In [6]: adder = theano.function(inputs=[x,y], outputs=z)
In [7]: adder(1,2)
Out[7]: array(3.)
However, in the VS code, the error message saying ModuleNotFoundError: No module named 'theano' pops up.
Plus, it seems that only capitalized theano, which is THEANO, is only recognizable based on their green-like color, but THEANO.tensor is not recognized as well.
I believe this is an issue that a lot of beginners experience due to the unfamiliarity to all these "complicated" system variables, working path, and so on.
Can anyone point out what the problem is ?
Thanks in advance.
Best,