microsoft / unilm

Large-scale Self-supervised Pre-training Across Tasks, Languages, and Modalities
https://aka.ms/GeneralAI
MIT License
19.25k stars 2.45k forks source link

ERROR in TROCR installation #779

Open shenw000 opened 2 years ago

shenw000 commented 2 years ago

To install trocr on Ubuntu 20.04, I followed the trocr installation steps on https://github.com/microsoft/unilm/tree/master/trocr

conda create -n trocr python=3.7 conda activate trocr git clone https://github.com/microsoft/unilm.git cd unilm cd trocr pip install pybind11 pip install -r requirements.txt pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" 'git+https://github.com/NVIDIA/apex.git'

Every goes well until I ran the installation script of trocr, pip install -r requirements.txt I encountered the following error

======================================================================== INFO: pip is looking at multiple versions of fastwer to determine which version is compatible with other requirements. This could take a while. Collecting fastwer Using cached fastwer-0.1.tar.gz (3.6 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [6 lines of output] Traceback (most recent call last): File "", line 36, in File "", line 34, in File "/tmp/pip-install-p201j4px/fastwer_063feafc5a6f4f29a4b5e94054f4c21a/setup.py", line 93, in with open('LICENSE') as f: FileNotFoundError: [Errno 2] No such file or directory: 'LICENSE' [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.

========================================================================

I searched the Internet for possible solutions, but didn't see any. I did upgraded the pip to version 22.1.2

dka-lmis commented 2 years ago

As a temporary hotfix you can

I was able to at least pull and set up the environment

(if anyone wants to use it under windows: Open the PowerShell as root, or just use WSL with an up-to-date gcc version) EDIT: No need to use an older checkout of fairseq

bit-scientist commented 11 months ago

Hi, @dka-lmis, I know it's been over a year. I hope it's still relevant to you 😃 I did as you suggested, but still the same error occured. Could you please share your requirements.txt file for reference?

Right now, I am trying to install the dependencies one by one, so it would also be great to know what versions of dependencies you got over there. Thank you!

haojianqi1 commented 10 months ago

https://wiki.python.org/moin/WindowsCompilers watch this and download then solved