简体   繁体   中英

Python packages not getting imported after installing Anaconda

After setting up Anaconda according to the setup instructions, I tried to run python in cmd and then

import pandas as pd

I also tried the following commands to check

where python
where conda

C:\\Users\\aashi\\anaconda3\\python.exe

C:\\Users\\aashi\\AppData\\Local\\Microsoft\\WindowsApps\\python.exe

C:\\Users\\aashi\\anaconda3\\condabin\\conda.bat

C:\\Users\\aashi\\anaconda3\\Scripts\\conda.exe

C:\\Users\\aashi\\anaconda3\\Library\\bin\\conda.bat

Python works properly, but after typing import pandas as pd or import numpy as np

I got the error ImportError: DLL load failed: The specified module could not be found.

However, when I run the same commands in Anaconda prompt, it works fine.

First Option: Try to install the package in the conda env(Virtual Environment which is automatically created.)

Second Option: You can install the module through Anaconda Prompt.

Third Option:

conda create --name myenv When conda ask for Proceed? Type 'y' activate myenv conda install numpy

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