简体   繁体   中英

Import numpy works when python code executed through anaconda prompt but produces an error when run through cmd

When I run any python script that imports numpy using Anaconda prompt it works fine, but when I run it using command line it gives me the following error: cmd错误

I have searched online ( link , link ) but all similar questions have a filename conflict with an existing module which does not seem to be the case here.

When you execute within anaconda environment (which is what the conda is), the path to the python is known within the env.

When you execute outside the conda env, you need to either have the Python in the system path, as an environment variable (windows), or however it is in Linux, or navigate to the Anaconda python.exe location

Otherwise, have alook here: NumPy library ImportError: DLL load failed: The specified procedure could not be found

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