'Cannot install pandas datareader package. Is there a way to fix this?

I am trying to build a prediction model and needs to get data from stock API. Found that pandas datareader is the way to go. But when I try to install it using

conda install -c delichon pandas_datareader

enter image description here the following error occurs. I have python version 3.8

I tried installing pandas-datareader using 'conda install -c anaconda pandas-datareader' which was successful but couldn't use it in code.

I am trying to run

import pandas_datareader as pdr

for which I get the error No module named 'pandas_datareader'



Solution 1:[1]

There may be an issue about your conda environment. You should check your Python version of conda environment.

conda env list
* activate your conda environment
conda activate example-env
python --version

Or

Please check the installed Python versions of your Conda

conda list python -f

Or you can directly create a new conda environment with Python 3

conda create --name env-name python=3.8

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ?lker Kara