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]$
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.
Comments