15

I'm using python 3.x in my windows 7. The pandas version in my system is 0.20.3. As per my project requirement, I need to install Pandas version 0.19.2 Can you suggest me how to do that?

I also tried to install it using anaconda prompt & I got following message given in screen shot

Marian Nasry
  • 821
  • 9
  • 22
Julian
  • 153
  • 1
  • 2
  • 6
  • 2
    Possible duplicate of [How to install a specific version of a package with pip?](https://stackoverflow.com/questions/13916820/how-to-install-a-specific-version-of-a-package-with-pip) – anothernode May 08 '18 at 10:18
  • Uninstall blaze and then try the pandas command again. If you need blaze, try reinstalling afterwards to see what happens. `conda info blaze` should also have useful information. – Alex Hall May 08 '18 at 12:10

4 Answers4

22

Assuming pandas was installed with pip, you can simply redo the install with the desired version. If it was installed by some other method, the below may not work.

In a command terminal:

pip install pandas==0.19.2

In the output, you should see mention of the previous version being uninstalled.

Alex Hall
  • 34,833
  • 5
  • 57
  • 89
7

There's an incompatibility version between pandas and your blaze package. It also does not have a fixed version, so the incompatibility can appear any time.

You can downgrade two packages at once:

conda install pandas==0.25 python==3.7

I'd uninstall blaze, downgrade pandas and try to reinstall blaze again.

It is always a good practice to fix your package versions and commit them to your version control. Use this command:

conda env export -f environment.yml

It will save every version of your pandas and pip packages. Add it to your version control.

BTW, I prefer to export using the option --from-history. It will export just the libs you explicitly installed, and not the dependencies:

conda env export --from-history > environment.yml

It will prevent a lot of troubles.

Note: for --from-history to work fine, you must have fixed your package version when installing packages: conda install pandas==0.25. Do not install without a version number: conda install pandas

neves
  • 33,186
  • 27
  • 159
  • 192
5

While the above answers propose a solution, note that if you want to downgrade a version of preinstalled package pip install is not enough. Instead one needs to tell pip to uninstall the previous version if it is not the required one. (With the not so intuitive flag --upgrade)

For example:

pip install --upgrade pandas==0.19.2
borgr
  • 20,175
  • 6
  • 25
  • 35
0

Error solve as I have changed pandas version manually in requrments.txt file

Shah Vipul
  • 625
  • 7
  • 11