Unable to downgrade version of Python package by `pip install -I`

Yang

To temporary workaround a compatibility issue, I tried to downgrade version of Python package arrow from 0.17.0 to 0.13.2.

On a particular server I was unable to, as the below command calls to install 0.13.2 but ends up install back 0.17.0. If remove the virtual environment, and generate a new one and freshly install 0.13.2, it works OK.

I also tested on a virtual machine, and the downgrade works OK without this symptom.

I'm wondering why, and any inputs will be highly appreciated.

(venv3.7) [user@host freeze]$ pip install -I arrow==0.13.2
Collecting arrow==0.13.2
  Using cached arrow-0.13.2-py2.py3-none-any.whl (37 kB)
Collecting python-dateutil
  Using cached python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
Collecting six>=1.5
  Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Installing collected packages: six, python-dateutil, arrow
Successfully installed arrow-0.17.0 python-dateutil-2.8.1 six-1.15.0
(venv3.7) [user@host freeze]$
Nikolas Stevenson-Molnar

Use --force-reinstall instead of -I, --ignore-installed.

-I can break existing installs, according to the docs:

-I, --ignore-installed Ignore the installed packages, overwriting them. This can break your system if the existing package is of a different version or was installed with a different package manager!

If you want to install a version older than what you currently have installed, --force-reinsall is a better fit:

--force-reinstall Reinstall all packages even if they are already up-to-date.

A demonstration of --force-reinstall in action:

$ pip install arrow==0.17.0
Collecting arrow==0.17.0
<... snip ...>
Successfully installed arrow-0.17.0

$ pip install --force-reinstall arrow==0.13.2
Collecting arrow==0.13.2
<... snip ...>
Attempting uninstall: arrow
Found existing installation: arrow 0.17.0
Uninstalling arrow-0.17.0:
  Successfully uninstalled arrow-0.17.0
Successfully installed arrow-0.13.2 python-dateutil-2.8.1 six-1.15.0

$ pip freeze | grep arrow
arrow==0.13.2

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

conda install downgrade python version

From Dev

How can I install an apt-get/pip package for use by a particular Python version?

From Dev

Unable to install package from pip

From Java

How to install python3 version of package via pip on Ubuntu?

From Dev

Unable to downgrade Binutils package

From Dev

Python source files not extracted when I pip install my package

From Dev

Unable to Install Python Package

From Dev

How to install a specific version of a package with pip

From Dev

raspberry pi unable to install lxml pip package

From Dev

Unable to install mock package on MacOSX using pip

From Dev

Unable to install mock package on MacOSX using pip

From Dev

Unable to install any package through pip

From Dev

unable to install python package/module on windows (tried easy install as well as pip already)

From Dev

"Unable to locate package python-pip" When trying to install from fresh 18.04 install

From Dev

How do I use aptitude to downgrade/force version of a package?

From Dev

pip - how to install a package that requires an older version of pip

From Dev

install mysql specific version (Unable to locate package)

From Dev

Unable to install xlsx package on R version 3.1.3

From Dev

install mysql specific version (Unable to locate package)

From Dev

Unable to do 'pip install version' with a Python import error - ImportError: cannot import name 'izip_longest'

From Dev

How pip determine a python package version

From Dev

E: Unable to locate package python-pip

From Java

Install a Python package into a different directory using pip?

From Dev

Install/use pip for specific version/location of python

From Dev

Python install previous version of selenium through pip

From Dev

How to install pip packages to specific Python version?

From Dev

Unable to install python pip on Ubuntu 14.04

From Dev

Unable to install Python pip in Ubuntu 17.10

From Dev

How can I install a legacy PIP version with python 2.6.6 or python 2.7.5?

Related Related

  1. 1

    conda install downgrade python version

  2. 2

    How can I install an apt-get/pip package for use by a particular Python version?

  3. 3

    Unable to install package from pip

  4. 4

    How to install python3 version of package via pip on Ubuntu?

  5. 5

    Unable to downgrade Binutils package

  6. 6

    Python source files not extracted when I pip install my package

  7. 7

    Unable to Install Python Package

  8. 8

    How to install a specific version of a package with pip

  9. 9

    raspberry pi unable to install lxml pip package

  10. 10

    Unable to install mock package on MacOSX using pip

  11. 11

    Unable to install mock package on MacOSX using pip

  12. 12

    Unable to install any package through pip

  13. 13

    unable to install python package/module on windows (tried easy install as well as pip already)

  14. 14

    "Unable to locate package python-pip" When trying to install from fresh 18.04 install

  15. 15

    How do I use aptitude to downgrade/force version of a package?

  16. 16

    pip - how to install a package that requires an older version of pip

  17. 17

    install mysql specific version (Unable to locate package)

  18. 18

    Unable to install xlsx package on R version 3.1.3

  19. 19

    install mysql specific version (Unable to locate package)

  20. 20

    Unable to do 'pip install version' with a Python import error - ImportError: cannot import name 'izip_longest'

  21. 21

    How pip determine a python package version

  22. 22

    E: Unable to locate package python-pip

  23. 23

    Install a Python package into a different directory using pip?

  24. 24

    Install/use pip for specific version/location of python

  25. 25

    Python install previous version of selenium through pip

  26. 26

    How to install pip packages to specific Python version?

  27. 27

    Unable to install python pip on Ubuntu 14.04

  28. 28

    Unable to install Python pip in Ubuntu 17.10

  29. 29

    How can I install a legacy PIP version with python 2.6.6 or python 2.7.5?

HotTag

Archive