安装nlgeval报错

结论放在前面:
换网络,或是科学上网,或是重启wifi,不断尝试以下代码:

python setup.py install

wish you lucky~

当然上面的办法是没有办法,可以试一下将gensim要求改一下:
在这里插入图片描述中途报错按照什么包就相应的pip install安装


以下是错误到成功过程:

按照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#sha256=fe98277a7b3b4987b40c928056bbaae1d0715022cf27bba89d05cd0d4fe51a84
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#sha256=fe98277a7b3b4987b40c928056bbaae1d0715022cf27
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#sha256=9f2f7198a2c7db2d5118dffaaaab357927f689bbcb517
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#sha256=ba3de02490308b248f9b94c8bc1ac0683e9aa2ec49ee78536d8667af
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#sha256=71d14489da58b60ce12fc3ecb823facc59a8b23cd1b58edb
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'}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值