在安装gensim包时尝试直接使用pycharm的setting安装,但是出现了报错:
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
应是网络连接问题,转而用cmd来pip安装,又出现了以下错误:
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.
gensim from https://files.pythonhosted.org/packages/09/ed/b59a2edde05b7f5755ea68648487c150c7c742361e9c8733c6d4ca005020/gensim-3.8.1-cp37-cp37m-win_amd64.whl#sha256=36518200175c708e762f5763f34b1e5a6b64e7844f2c172afd480231361192fd:
Expected sha256 36518200175c708e762f5763f34b1e5a6b64e7844f2c172afd480231361192fd
Got be8adfd8e678d14915520808ee51722490ad890f55a217e06e36f44a67432db2
解决方法:输入
pip install --upgrade --default-timeout=1000 gensim
最终成功进行安装!