Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to downgrade Pandas Version

Tags:

python

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

like image 223
Julian Avatar asked May 08 '18 10:05

Julian


People also ask

How do I install lower version of pandas?

To install a specific version of a Python package you can use pip: pip install YourPackage==YourVersion . For example, if you want to install an older version of Pandas you can do as follows: pip install pandas==1.1. 3 .

How do I downgrade a python package?

Upgrade and Downgrade a Python Package. Upgrade and Downgrade are similar, both of which follow two steps: (1) uninstall the previous package; (2) install the current package. Update a package by pip: pip install -U [package name]. Update a package manually: (1) download the package; (2) install the package.


2 Answers

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.

like image 189
Alex Hall Avatar answered Oct 11 '22 18:10

Alex Hall


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

like image 40
neves Avatar answered Oct 11 '22 16:10

neves