The requirements for the code to run is
I have python 2.7.8 by checking python --version. Installing them on python website also lead to a message saying there is no software to install so I assumed that I already have python 2.7x
For tensorflow I have install it using pip3 install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.0-py3-none-any.whl
and for Scipy and numpy i did brew install numpy scipy ipython jupyter
I have a python env setup call mypython.
Using pip list I have the following modules install as shown in the image.
But still VScode prompt an error and say that No module named 'tensorflow'when i run the code file.
How do I solve this?
CodePudding user response:
Think you might be using the wrong pip. Could you run following in your terminal, with your venv activated.
$ pip --version
$ pip3 --version
Try installing with pip instead of pip3
CodePudding user response:
- Install Python extension instead of MagicPython;
- You're using
mypython
in integrated Terminal but in left bottom corner, you select the global one,which is python3.10.1 as interpreter. Open Command Palette and choose Python: Select Interpreter, selectmypython
then reload window,the error should go away