Reputation: 2358
I am running a web version of a Jupyter notebook from a course material, and this code cell runs through successfully:
But when I ran it from a VS CODE virtual environment, I get the below error. Please help with the error.
Upvotes: 0
Views: 87
Reputation: 76
You are not stating what you mean by "web version". But in any case, you very likely have different versions of numpy. You can run
import numpy as np
np.__version__
in both of your environments to check the version you are using. Then, if you want to have the same version in your local VSCode, simply open the terminal and run
pip install numpy==x.y.z
Where x.y.z is the version you had in the web version.
Upvotes: 1