简体   繁体   中英

How do I resolve a "module not found" error in cmd prompt

I try importing numpy from windows command prompt but got 'module not found' error

>>> import numpy as np
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'numpy 

However, I am able to import numpy successfully on jupiter notebook. How do I fix this problem?

From the information you gave, you probably have multiple python installs and one doesn't have numpy installed, if you have vscode you can check if you have multiple verisons with ctrl+ shift + p then typing python interpreter .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM