I am using pip to install all my python packages but get error as shown in the trace below. What is the problem and how can I solve it?
usr@comp:~$ pip install flask Collecting flask Using cached Flask-0.11.1-py2.py3-none-any.whl Collecting itsdangerous>=0.21 (from flask) Using cached itsdangerous-0.24.tar.gz Collecting click>=2.0 (from flask) Using cached click-6.6.tar.gz Collecting Werkzeug>=0.7 (from flask) Using cached Werkzeug-0.11.11-py2.py3-none-any.whl Requirement already satisfied (use --upgrade to upgrade): Jinja2>=2.4 in /usr/lib/python2.7/dist-packages (from flask) Requirement already satisfied (use --upgrade to upgrade): MarkupSafe in /usr/lib/python2.7/dist-packages (from Jinja2>=2.4->flask) 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. Werkzeug>=0.7 from https://pypi.python.org/packages/a9/5e/41f791a3f380ec50f2c4c3ef1399d9ffce6b4fe9a7f305222f014cf4fe83/Werkzeug-0.11.11-py2.py3-none-any.whl#md5=c63a21eedce9504d223ed89358c4bdc9 (from flask): Expected md5 c63a21eedce9504d223ed89358c4bdc9 Got 13a168aafcc43354b6c79ef44bb0dc71
Most Python packages are now designed to be compatible with pip. If you have a package that's not compatible, then you'll need to do a manual installation. How to manually install a Python package: Download the package and extract it into a local directory.
If you want to force pip to clear out its download cache and use the specific version you can do by using --no-cache-dir command. If you are using an older version of pip than upgrade it with pip install -U pip. This will help you clear pip cache.
Ensure you can run pip from the command lineRun python get-pip.py . 2 This will install or upgrade pip. Additionally, it will install setuptools and wheel if they're not installed already.
Pip can be used to upgrade all packages on either Windows or Linux: Output a list of installed packages into a requirements file (requirements. txt):
There is a similar problem (Why does pip fail with bad md5 hash for package?) from 2013 the solution that I tried that worked for me is this:
sudo pip install --no-cache-dir flask
given by attolee
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With