Problem: an error “these packages do not match the hashes from the requirements file” appears when installing the third-party library
Reason: the download error is usually caused by the network speed problem, resulting in the corresponding hash value does not match.
Solution: when pip is needed, add the “- upgrade” parameter. Usually, the download will report an error timeout at this time, so adding a “- default timeout = 100000” is more secure (the value of timeout can vary according to the situation).
pip install --upgrade --default-timeout=100000 packagename
Later, when installing pyqt5, I encountered the same problem. I still reported an error by using the above method. After using the online method, I solved the problem
# Install pyqt5
pip install PyQt5 -i https://pypi.douban.com/simple
# Install pyqt5-tools
pip install PyQt5-tools -i http://pypi.douban.com/simple --trusted-host=pypi.douban.com