结论放在前面: 换网络,或是科学上网,或是重启wifi,不断尝试以下代码:
python setup.py install
wish you lucky~
以下是错误到成功过程:
按照https://blog.csdn.net/qq_38247544/article/details/106650471安装,报错如下
Installed d:\programfiles\anaconda3\envs\pytorch\lib\site-packages\nlg_eval-2.3-py3.7.egg
Processing dependencies for nlg-eval==2.3
Searching for gensim~=3.8.3
Reading https://pypi.org/simple/gensim/
Download error on https://pypi.org/simple/gensim/: [WinError 10054] 远程主机强迫关闭了一个现有的连接。 -- Some packages may not be found!
Couldn't find index page for 'gensim' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.org/simple/
Download error on https://pypi.org/simple/: [WinError 10054] 远程主机强迫关闭了一个现有的连接。 -- Some packages may not be found!
No local packages or working download links found for gensim~=3.8.3
error: Could not find suitable distribution for Requirement.parse('gensim~=3.8.3')
或者
Installed d:\programfiles\anaconda3\envs\pytorch\lib\site-packages\nlg_eval-2.3-py3.7.egg
Processing dependencies for nlg-eval==2.3
Searching for gensim~=3.8.3
Reading https://pypi.org/simple/gensim/
Downloading https://files.pythonhosted.org/packages/0b/66/04faeedb98bfa5f241d0399d0102456886179cabac0355475f23a2978847/gensim-3.8.3-cp37-cp37m-win_amd64.whl
error: The read operation timed out
换源也于事无补 初步推断是网络问题
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
nlg-eval 2.3 requires Cython>=0.28.5, which is not installed.
nlg-eval 2.3 requires gensim~=3.8.3, which is not installed.
nlg-eval 2.3 requires nltk>=3.4.5, which is not installed.
反复尝试后:
Installed d:\programfiles\anaconda3\envs\pytorch\lib\site-packages\nlg_eval-2.3-py3.7.egg
Processing dependencies for nlg-eval==2.3
Searching for gensim~=3.8.3
Reading https://pypi.org/simple/gensim/
Downloading https://files.pythonhosted.org/packages/0b/66/04faeedb98bfa5f241d0399d0102456886179cabac0355475f23a2978847/gensim-3.8.3-cp37-cp37m-win_amd64.whl
bba89d05cd0d4fe51a84
Best match: gensim 3.8.3
Processing gensim-3.8.3-cp37-cp37m-win_amd64.whl
Installing gensim-3.8.3-cp37-cp37m-win_amd64.whl to d:\programfiles\anaconda3\envs\pytorch\lib\site-packages
Adding gensim 3.8.3 to easy-install.pth file
Installed d:\programfiles\anaconda3\envs\pytorch\lib\site-packages\gensim-3.8.3-py3.7-win-amd64.egg
Searching for Cython>=0.28.5
Reading https://pypi.org/simple/Cython/
Downloading https://files.pythonhosted.org/packages/c4/7c/293f5e9311664af5f54ca46dcb2118fc1b4e551eec161f74c050f17cd991/Cython-3.0.0a10-py2.py3-none-any.whl
fb37083724500a02a0c
Best match: Cython 3.0.0a10
Processing Cython-3.0.0a10-py2.py3-none-any.whl
Installing Cython-3.0.0a10-py2.py3-none-any.whl to d:\programfiles\anaconda3\envs\pytorch\lib\site-packages
Adding Cython 3.0.0a10 to easy-install.pth file
Installing cygdb-script.py script to D:\programfiles\Anaconda3\envs\pytorch\Scripts
Installing cygdb.exe script to D:\programfiles\Anaconda3\envs\pytorch\Scripts
Installing cython-script.py script to D:\programfiles\Anaconda3\envs\pytorch\Scripts
Installing cython.exe script to D:\programfiles\Anaconda3\envs\pytorch\Scripts
Installing cythonize-script.py script to D:\programfiles\Anaconda3\envs\pytorch\Scripts
Installing cythonize.exe script to D:\programfiles\Anaconda3\envs\pytorch\Scripts
Installed d:\programfiles\anaconda3\envs\pytorch\lib\site-packages\cython-3.0.0a10-py3.7.egg
Searching for nltk>=3.4.5
Reading https://pypi.org/simple/nltk/
Downloading https://files.pythonhosted.org/packages/43/0b/8298798bc5a9a007b7cae3f846a3d9a325953e0f9c238affa478b4d59324/nltk-3.7-py3-none-any.whl
b5e3eec8
Best match: nltk 3.7
Processing nltk-3.7-py3-none-any.whl
Installing nltk-3.7-py3-none-any.whl to d:\programfiles\anaconda3\envs\pytorch\lib\site-packages
Adding nltk 3.7 to easy-install.pth file
Installing nltk-script.py script to D:\programfiles\Anaconda3\envs\pytorch\Scripts
Installing nltk.exe script to D:\programfiles\Anaconda3\envs\pytorch\Scripts
Installed d:\programfiles\anaconda3\envs\pytorch\lib\site-packages\nltk-3.7-py3.7.egg
Searching for smart-open>=1.8.1
Reading https://pypi.org/simple/smart-open/
Downloading https://files.pythonhosted.org/packages/cd/11/05f68ea934c24ade38e95ac30a38407767787c4e3db1776eae4886ad8c95/smart_open-5.2.1-py3-none-any.whl
97175640350d3a62
Best match: smart-open 5.2.1
Processing smart_open-5.2.1-py3-none-any.whl
Installing smart_open-5.2.1-py3-none-any.whl to d:\programfiles\anaconda3\envs\pytorch\lib\site-packages
Adding smart-open 5.2.1 to easy-install.pth file
Installed d:\programfiles\anaconda3\envs\pytorch\lib\site-packages\smart_open-5.2.1-py3.7.egg
error: Cython 3.0.0a10 is installed but Cython==0.29.14 is required by {'gensim'}
|