QData / TextAttack

TextAttack 🐙 is a Python framework for adversarial attacks, data augmentation, and model training in NLP https://textattack.readthedocs.io/en/master/
https://textattack.readthedocs.io/en/master/
MIT License
2.98k stars 397 forks source link

pip install textattack error while building wheel for pycld2 #720

Closed qaixerabbas closed 1 year ago

qaixerabbas commented 1 year ago

Hello everyone.

Thank you to the developers for this wonderful and helpful open source package.

I am using Python 3.9 and while installing textattack I ran into following issue: (The original output contained long long lines so I trimmed the text to specific issue message.)

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pycld2

note: This is an issue with the package mentioned above, not pip.

Solution:

To install pycld2 go to this link and download .whl file for whatever version of python you are using (I downlaoded for python 3.9). Then go to the directory where the .whl file was installed and write:

pip install pycld2-0.41-cp39-cp39-win_amd64.whl

After this hopefully you can install textattack successfully. I am creating this issue so others can get help directly form here without navigating to pycld2 git repo.

qaixerabbas commented 1 year ago

Reference: https://github.com/aboSamoor/pycld2/issues/34