Install Anaconda packages and libraries in your Linux subsystem on Windows. Your integrated terminal is a Bash shell on Windows 10, which does not have any installed package and library for your code.
Try sudo apt-get install python-pip
and pip install numpy
or sudo apt-get install python3-pip
and pip3 install numpy
on integrated terminal in vscode.
If this solves your module error for numpy, try the following lines to install conda in your Linux subsystem, or you can just use pip to manage your python packages and libraries.
curl -O https://repo.continuum.io/archive/Anaconda3-5.2.0-Linux-x86_64.sh
bash Anaconda3-5.2.0-Linux-x86_64.sh
This will give the following output and type yes to this:
Do you wish the installer to prepend the Anaconda3 install location
to PATH in your /home/[username]/.bashrc ? [yes|no]
Then, source your .bashrc
:
source ~/.bashrc
Now, you can use command conda
to install packages. Try to install packages and libraries you want with the following command:
conda install [package name]
Or you can check what is installed on your conda with the following command:
conda list