Python packages hash not matching whilst installing using pip

前端 未结 7 825
甜味超标
甜味超标 2020-12-30 20:26

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 insta         


        
相关标签:
7条回答
  • 2020-12-30 20:58

    I had a similar issue for a different module. It was caused by network failure. My fix was nothing complex but another attempt at installing it and it worked.

    0 讨论(0)
  • 2020-12-30 21:04

    I got the error during installing panads

    You need to remove the cache and reinstall .

    pip install --no-cache-dir flask
    
    0 讨论(0)
  • 2020-12-30 21:04

    The solution may be made apparent by simply verifying the specified package's published hash with your calculated hash of the downloaded file.

    If they match - then the pip install might have corrupted the download. If they don't match - then either the hash was not correctly published when the package was published - or - whomever tampered with the download file missed updating the md5 hash.

    Be thankful that pip has proper download hygiene. A vast majority of computer users never compare hashes of the software they download and install.

    0 讨论(0)
  • 2020-12-30 21:07

    You need to upgrade your pip into the newer version:

    Using this command:

    python -m pip install -upgrade pip
    

    for Mac/Linux operating system and use

    python -m pip install --upgrade tensorflow
    

    for Windows to update your pip. Then run your command

     pip install flask
    
    0 讨论(0)
  • 2020-12-30 21:11

    Looks like a cache problem, the cached package is different from REQUIREMENTS.

    Perhaps caused by last updates interruption.

    I did this which fixed my problem:

    rm ~/.cache/pip -rf
    
    0 讨论(0)
  • 2020-12-30 21:17

    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

    0 讨论(0)
提交回复
热议问题