pip3 uninstall opencv-python # Uninstall opencv manually as it conflicts with pyqt
pip3 uninstall opencv-python # Uninstall opencv manually as it conflicts with pyqt
pip3 install opencv-contrib-python-headless # Install the headless version of opencv
pip3 install opencv-contrib-python-headless==4.2.0.32 # Install the headless version of opencv
cd ./PPOCRLabel # Change the directory to the PPOCRLabel folder
cd ./PPOCRLabel # Change the directory to the PPOCRLabel folder
python3 PPOCRLabel.py
python3 PPOCRLabel.py
```
```
...
@@ -162,9 +162,9 @@ For some data that are difficult to recognize, the recognition results will not
...
@@ -162,9 +162,9 @@ For some data that are difficult to recognize, the recognition results will not
```
```
pyrcc5 -o libs/resources.py resources.qrc
pyrcc5 -o libs/resources.py resources.qrc
```
```
- If you get an error ``` module 'cv2' has no attribute 'INTER_NEAREST'```, you need to delete all opencv related packages first, and then reinstall the headless version of opencv
- If you get an error ``` module 'cv2' has no attribute 'INTER_NEAREST'```, you need to delete all opencv related packages first, and then reinstall the 4.2.0.32 version of headless opencv