castrust.blogg.se

Python pip install specific version
Python pip install specific version









If I now run pip install -I package=2.0.0, the old datetime.py file will not be removed, so any calls to import datetime will import the wrong module. Now lets say I run pip install package=3.0.0, but then later realize that I actually wanted version 2.0.0. Now, in this points to the standard library datetime module, but in they added a local datetime.py as a replacement for the standard library version (for whatever reason). In one of packages files, they use import datetime.

python pip install specific version

This can cause weird behavior if those files share names with other installed modules.įor example, let's say there's a package named package. This means that any files that should be deleted between versions will instead be left in place. I will not uninstall the existing package before proceeding it will just install it on top of the old one. I recently ran into an issue when using pip's -I flag that I wanted to document somewhere:

python pip install specific version

So to properly install the driver, you can follow these steps: pip uninstall MySQL_python The download link 404s and the fallback URL links are re-directing infinitely due to 's recent upgrade and PyPI's stale URL. If you look at pip's installation log, or if you do a pip install -Iv MySQL_python=1.2.2 you'll find that the PyPI URL link does not work for MySQL_python v1.2.2. However, you'll soon find out that this doesn't work. Since you already have an installed version, you should either uninstall the current existing driver or use pip install -I MySQL_python=1.2.2 Ivvv).įor more information, see pip install -helpįirst, I see two issues with what you're trying to do.

python pip install specific version

You can combine for even more verbosity (i.e.

python pip install specific version

  • -I stands for -ignore-installed which will ignore the installed packages, overwriting them.
  • Thanks to for highlighting this (and it seems that the context of the question has broadened given the time when the question was first asked!), the documentation for Python discusses a caveat with using -I, in that it can break your installation if it was installed with a different package manager or if if your package is/was a different version.
  • -force-reinstall is an option to reinstall all packages even if they are already up-to-date.
  • For example: pip install -force-reinstall -v "MySQL_python=1.2.2"











    Python pip install specific version