I had this peculiar problem of updates and pip installs failing on an Ubuntu #linux VM running in VirtualBox on Windows
Errors are like the following:
$ pip install --upgrade django
Collecting django
Using cached Django-3.1.4-py3-none-any.whl (7.8 MB)
ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
django from https://files.pythonhosted.org/packages/08/c7/7ce40e5a5cb47ede081b9fa8a3dd93d101c884882ae34927967b0792f5fb/Django-3.1.4-py3-none-any.whl#sha256=5c866205f15e7a7123f1eec6ab939d22d5bde1416635cab259684af66d8e48a2:
Expected sha256 5c866205f15e7a7123f1eec6ab939d22d5bde1416635cab259684af66d8e48a2
Got caa8b913f298bf97bf9a826f14519b3d777d63b034561f3acfc57dbe099577d0
I spent the greater part of the day working on fixing this as I needed to start a new django project.
Here are a few things you can do to make sure this is working:
- Update to latest version of VirtualBox
- Check if you have any other virtualization software running on your host OS. In my case I had docker running. Uninstall it.
- remove the cached pip files . Typically this is : $ rm -rf ~/.cache/pip/
- Now do a $ pip install django . It should work now.
No comments:
Post a Comment