Closed eliuha closed 4 years ago
Did you try to install requirements as follows:
python -m pip install -r requirements.txt
?
The README has a mistake. It shows python -m pip install -r requirements.txt
without the -r
argument.
Also the requirements.txt
file has two mistakes in it where it shows +cpu
at the end of two packages
`eliuha@machine:~/dev/lpr/pytorch-text-recognition$ python app.py --input_file test_image.jpeg /home/eliuha/anaconda3/lib/python3.6/site-packages/matplotlib/font_manager.py:279: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment. 'Matplotlib is building the font cache using fc-list. ' Traceback (most recent call last): File "app.py", line 19, in import text_reco.models.craft.craft_utils as craft_utils File "/home/eliuha/dev/lpr/pytorch-text-recognition/text_reco/models/craft/craft_utils.py", line 6, in import cv2 ModuleNotFoundError: No module named 'cv2'
I use linux system, I fixed this problem, by the solution:
apt-get update
apt-get install -y libsm6 libxext6 libxrender-dev
pip install opencv-python
`eliuha@machine:~/dev/lpr/pytorch-text-recognition$ python app.py --input_file test_image.jpeg /home/eliuha/anaconda3/lib/python3.6/site-packages/matplotlib/font_manager.py:279: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment. 'Matplotlib is building the font cache using fc-list. ' Traceback (most recent call last): File "app.py", line 19, in
import text_reco.models.craft.craft_utils as craft_utils
File "/home/eliuha/dev/lpr/pytorch-text-recognition/text_reco/models/craft/craft_utils.py", line 6, in
import cv2
ModuleNotFoundError: No module named 'cv2'