安装lru时报错详情:
(textattack-master) G:\xxx\TextAttack-master>pip install lru
Collecting lru
Using cached lru-0.1.tar.gz (1.1 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [9 lines of output]
Traceback (most recent call last):
File "" , line 36, in <module>
File "" , line 34, in <module>
File "C:\Users\user\AppData\Local\Temp\pip-install-ol85bcqc\lru_2da420766b1d47d693126f3791a2d882\setup.py", line 2, in <module>
from lru import __version__ as version
File "C:\Users\user\AppData\Local\Temp\pip-install-ol85bcqc\lru_2da420766b1d47d693126f3791a2d882\lru.py", line 18
raise KeyError, key
^
SyntaxError: invalid syntax
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
TextAttackTextAttack: A Framework for Adversarial Attacks, Data Augmentation, and Adversarial Training in NLP. John Morris, Eli Lifland, Jin Yong Yoo, Jake Grigsby, Di Jin, Yanjun Qi. EMNLP 2020 Demo. [website] [doc] [pdf]