I am using the Anaconda distribution with Python 3.7. Among the packages installed, I have numpy, pandas, etc. In PyCharm IDE, I have set the Project Interpreter to be the p
Even I was running the python file on command prompt, but the python.exe was from Anaconda. so when you run any python file you get,
Warning: This Python interpreter is in a conda environment, but the environment has not been activated. Libraries may fail to load. To activate this environment please see https://conda.io/activation.
you need to activate the environment by using this command
conda init cmd.exe
conda activate
you see the command window as below, with base env
(base) C:\Users\yash\Documents\pycharm_project\venv>
Doing this I resolved this error
ImportError: numpy.core.multiarray failed to import Traceback (most recent call last): File "opencv_p1.py", line 2, in import cv2 File "E:\Anaconda3\lib\site-packages\cv2__init__.py", line 3, in from .cv2 import * ImportError: numpy.core.multiarray failed to import
In case you want to deactivate the conda use
conda deactivate
Please follow this link in case you have any doubt https://conda.io/activation