Google Vision,aws textract,azureなどのOCR エンジンをラップする「ocrpy」のインストール

スポンサーリンク

Google Vision,aws textract,azureなどのOCR エンジンをラップする「ocrpy」のインストールについて解説しています。

「ocrpy(https://github.com/maxent-ai/ocrpy)」は、Tesseract OCR、Aws Textract、Google Cloud Vision、Azure Computer Vision などのさまざまな OCR エンジンをラップし、クラウドツールやオープンソースライブラリによって提供されるインターフェイスを統合。統合することで、シンプルなインターフェイスを提供している。

■Python

今回のPythonのバージョンは、「3.8.5」を使用しています。(Windows10)(pythonランチャーでの確認)

■ocrpyをインストールする

ocrpyをインストールを行いますが、今回はpipを経由してインストールを行うので、まずWindowsのコマンドプロンプトを起動します。

pip install ocrpy

起動後、上記のコマンドを入力し、Enterキーを押します。

なお、今回は、pythonランチャーを使用しており、Python Version 3.8.5にインストールを行うために、バージョンの切り替えを行います。

py -3.8 -m pip install ocrpy

切り替えるために、上記のコマンドを入力し、Enterキーを押します。

Defaulting to user installation because normal site-packages is not writeable
Collecting ocrpy
Downloading ocrpy-0.3.10-py3-none-any.whl (28 kB)
Collecting beautifulsoup4==4.9.1
Downloading beautifulsoup4-4.9.1-py3-none-any.whl (115 kB)
---------------------------------------- 115.1/115.1 kB 1.7 MB/s eta 0:00:00
Collecting pandas==1.3.3
Downloading pandas-1.3.3-cp38-cp38-win_amd64.whl (10.2 MB)
---------------------------------------- 10.2/10.2 MB 4.0 MB/s eta 0:00:00
Collecting pytesseract==0.3.6
Downloading pytesseract-0.3.6.tar.gz (13 kB)
Preparing metadata (setup.py) ... done
Collecting numpy==1.21.1
Downloading numpy-1.21.1-cp38-cp38-win_amd64.whl (14.0 MB)
---------------------------------------- 14.0/14.0 MB 5.6 MB/s eta 0:00:00
Requirement already satisfied: attrs==21.4.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from ocrpy) (21.4.0)
Collecting boto3==1.19.7
Downloading boto3-1.19.7-py3-none-any.whl (131 kB)
---------------------------------------- 131.8/131.8 kB 8.1 MB/s eta 0:00:00
Collecting farm-haystack==1.6.0
Downloading farm_haystack-1.6.0-py3-none-any.whl (596 kB)
---------------------------------------- 596.4/596.4 kB 6.3 MB/s eta 0:00:00
Collecting transformers==4.20.1
Using cached transformers-4.20.1-py3-none-any.whl (4.4 MB)
Collecting cloudpathlib==0.9.0
Downloading cloudpathlib-0.9.0-py3-none-any.whl (38 kB)
Collecting google-cloud-vision==1.0.0
Downloading google_cloud_vision-1.0.0-py2.py3-none-any.whl (435 kB)
---------------------------------------- 435.0/435.0 kB 6.7 MB/s eta 0:00:00
Collecting paddlepaddle==2.1.0
Downloading paddlepaddle-2.1.0-cp38-cp38-win_amd64.whl (61.4 MB)
---------------------------------------- 61.4/61.4 MB 4.7 MB/s eta 0:00:00
Collecting pdf2image==1.14.0
Downloading pdf2image-1.14.0-py3-none-any.whl (10 kB)
Requirement already satisfied: tqdm==4.64.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from ocrpy) (4.64.0)
Collecting layoutparser==0.3.4
Downloading layoutparser-0.3.4-py3-none-any.whl (19.2 MB)
---------------------------------------- 19.2/19.2 MB 5.6 MB/s eta 0:00:00
Collecting opencv-python==4.1.2.30
Downloading opencv_python-4.1.2.30-cp38-cp38-win_amd64.whl (33.0 MB)
---------------------------------------- 33.0/33.0 MB 5.5 MB/s eta 0:00:00
Collecting python-dotenv==0.17.1
Downloading python_dotenv-0.17.1-py2.py3-none-any.whl (18 kB)
Collecting torchvision==0.11.3
Downloading torchvision-0.11.3-cp38-cp38-win_amd64.whl (947 kB)
---------------------------------------- 948.0/948.0 kB 7.5 MB/s eta 0:00:00
Collecting soupsieve>1.2
Using cached soupsieve-2.3.2.post1-py3-none-any.whl (37 kB)
Collecting botocore<1.23.0,>=1.22.7
Downloading botocore-1.22.12-py3-none-any.whl (8.1 MB)
---------------------------------------- 8.1/8.1 MB 5.8 MB/s eta 0:00:00
Collecting s3transfer<0.6.0,>=0.5.0
Using cached s3transfer-0.5.2-py3-none-any.whl (79 kB)
Collecting jmespath<1.0.0,>=0.7.1
Using cached jmespath-0.10.0-py2.py3-none-any.whl (24 kB)
Requirement already satisfied: pydantic in c:\users\user_\appdata\roaming\python\python38\site-packages (from farm-haystack==1.6.0->ocrpy) (1.9.1)
Collecting seqeval
Downloading seqeval-1.2.2.tar.gz (43 kB)
---------------------------------------- 43.6/43.6 kB ? eta 0:00:00
Preparing metadata (setup.py) ... done
Collecting huggingface-hub<0.8.0,>=0.5.0
Using cached huggingface_hub-0.7.0-py3-none-any.whl (86 kB)
Collecting dill
Using cached dill-0.3.5.1-py2.py3-none-any.whl (95 kB)
Collecting sentence-transformers>=2.2.0
Using cached sentence-transformers-2.2.2.tar.gz (85 kB)
Preparing metadata (setup.py) ... done
Collecting quantulum3
Downloading quantulum3-0.7.10-py3-none-any.whl (10.7 MB)
---------------------------------------- 10.7/10.7 MB 5.8 MB/s eta 0:00:00
Collecting rapidfuzz<3,>=2.0.15
Downloading rapidfuzz-2.4.3-cp38-cp38-win_amd64.whl (1.2 MB)
---------------------------------------- 1.2/1.2 MB 7.2 MB/s eta 0:00:00
Collecting azure-core<1.23
Downloading azure_core-1.22.1-py3-none-any.whl (178 kB)
---------------------------------------- 178.6/178.6 kB 11.2 MB/s eta 0:00:00
Collecting mlflow
Downloading mlflow-1.28.0-py3-none-any.whl (17.0 MB)
---------------------------------------- 17.0/17.0 MB 5.9 MB/s eta 0:00:00
Collecting python-docx
Downloading python-docx-0.8.11.tar.gz (5.6 MB)
---------------------------------------- 5.6/5.6 MB 6.0 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Requirement already satisfied: requests in c:\users\user_\appdata\roaming\python\python38\site-packages (from farm-haystack==1.6.0->ocrpy) (2.28.1)
Collecting networkx
Downloading networkx-2.8.5-py3-none-any.whl (2.0 MB)
---------------------------------------- 2.0/2.0 MB 6.1 MB/s eta 0:00:00
Collecting elastic-apm
Downloading elastic-apm-6.11.0.tar.gz (173 kB)
---------------------------------------- 173.8/173.8 kB ? eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting elasticsearch<7.11,>=7.7
Downloading elasticsearch-7.10.1-py2.py3-none-any.whl (322 kB)
---------------------------------------- 322.1/322.1 kB 4.0 MB/s eta 0:00:00
Collecting azure-ai-formrecognizer==3.2.0b2
Downloading azure_ai_formrecognizer-3.2.0b2-py2.py3-none-any.whl (219 kB)
---------------------------------------- 219.7/219.7 kB 6.8 MB/s eta 0:00:00
Collecting nltk
Using cached nltk-3.7-py3-none-any.whl (1.5 MB)
Collecting langdetect
Using cached langdetect-1.0.9-py3-none-any.whl
Collecting tika
Using cached tika-1.24.tar.gz (28 kB)
Preparing metadata (setup.py) ... done
Collecting posthog
Downloading posthog-2.1.0-py2.py3-none-any.whl (31 kB)
Collecting torch<1.13,>1.9
Downloading torch-1.12.1-cp38-cp38-win_amd64.whl (161.9 MB)
---------------------------------------- 161.9/161.9 MB 371.9 kB/s eta 0:00:00
Collecting jsonschema
Downloading jsonschema-4.9.1-py3-none-any.whl (79 kB)
---------------------------------------- 79.5/79.5 kB ? eta 0:00:00
Collecting scipy>=1.3.2
Using cached scipy-1.9.0-cp38-cp38-win_amd64.whl (38.6 MB)
Collecting more-itertools
Downloading more_itertools-8.14.0-py3-none-any.whl (52 kB)
---------------------------------------- 52.2/52.2 kB ? eta 0:00:00
Collecting scikit-learn>=1.0.0
Using cached scikit_learn-1.1.2-cp38-cp38-win_amd64.whl (7.3 MB)
Collecting mmh3
Downloading mmh3-3.0.0-cp38-cp38-win_amd64.whl (15 kB)
Collecting google-api-core[grpc]<2.0.0dev,>=1.14.0
Downloading google_api_core-1.32.0-py2.py3-none-any.whl (93 kB)
---------------------------------------- 93.6/93.6 kB 5.2 MB/s eta 0:00:00
Collecting pillow
Using cached Pillow-9.2.0-cp38-cp38-win_amd64.whl (3.3 MB)
Collecting iopath
Downloading iopath-0.1.10.tar.gz (42 kB)
---------------------------------------- 42.2/42.2 kB ? eta 0:00:00
Preparing metadata (setup.py) ... done
Collecting pdfplumber
Downloading pdfplumber-0.7.4-py3-none-any.whl (40 kB)
---------------------------------------- 40.0/40.0 kB ? eta 0:00:00
Collecting pyyaml>=5.1
Using cached PyYAML-6.0-cp38-cp38-win_amd64.whl (155 kB)
Collecting decorator==4.4.2
Using cached decorator-4.4.2-py2.py3-none-any.whl (9.2 kB)
Requirement already satisfied: six in c:\users\user_\appdata\roaming\python\python38\site-packages (from paddlepaddle==2.1.0->ocrpy) (1.16.0)
Collecting astor
Using cached astor-0.8.1-py2.py3-none-any.whl (27 kB)
Collecting gast==0.3.3
Using cached gast-0.3.3-py2.py3-none-any.whl (9.7 kB)
INFO: pip is looking at multiple versions of opencv-python to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of numpy to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of layoutparser to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of google-cloud-vision to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of farm-haystack to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of cloudpathlib to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of boto3 to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of beautifulsoup4 to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of attrs to determine which version is compatible with other requirements. This could take a while.
Collecting attrs==21.4.0
Using cached attrs-21.4.0-py2.py3-none-any.whl (60 kB)
INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of ocrpy to determine which version is compatible with other requirements. This could take a while.
Collecting ocrpy
Downloading ocrpy-0.3.9-py3-none-any.whl (28 kB)
Collecting pytz>=2017.3
Downloading pytz-2022.2.1-py2.py3-none-any.whl (500 kB)
---------------------------------------- 500.6/500.6 kB 6.3 MB/s eta 0:00:00
Requirement already satisfied: python-dateutil>=2.7.3 in c:\users\user_\appdata\roaming\python\python38\site-packages (from pandas==1.3.3->ocrpy) (2.8.2)
Collecting torch<1.13,>1.9
Downloading torch-1.10.2-cp38-cp38-win_amd64.whl (226.6 MB)
---------------------------------------- 226.6/226.6 MB 3.3 MB/s eta 0:00:00
Requirement already satisfied: colorama in c:\users\user_\appdata\roaming\python\python38\site-packages (from tqdm==4.64.0->ocrpy) (0.4.5)
Requirement already satisfied: filelock in c:\users\user_\appdata\roaming\python\python38\site-packages (from transformers==4.20.1->ocrpy) (3.7.1)
Collecting tokenizers!=0.11.3,<0.13,>=0.11.1
Using cached tokenizers-0.12.1-cp38-cp38-win_amd64.whl (3.3 MB)
Collecting regex!=2019.12.17
Downloading regex-2022.7.25-cp38-cp38-win_amd64.whl (262 kB)
---------------------------------------- 262.8/262.8 kB 4.1 MB/s eta 0:00:00
Requirement already satisfied: packaging>=20.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from transformers==4.20.1->ocrpy) (20.9)
Collecting msrest>=0.6.21
Using cached msrest-0.7.1-py3-none-any.whl (85 kB)
Collecting azure-common~=1.1
Using cached azure_common-1.1.28-py2.py3-none-any.whl (14 kB)
Requirement already satisfied: typing-extensions in c:\users\user_\appdata\roaming\python\python38\site-packages (from torch<1.13,>1.9->farm-haystack==1.6.0->ocrpy) (4.3.0)
Requirement already satisfied: urllib3<1.27,>=1.25.4 in c:\users\user_\appdata\roaming\python\python38\site-packages (from botocore<1.23.0,>=1.22.7->boto3==1.19.7->ocrpy) (1.26.11)
Requirement already satisfied: certifi in c:\users\user_\appdata\roaming\python\python38\site-packages (from elasticsearch<7.11,>=7.7->farm-haystack==1.6.0->ocrpy) (2022.6.15)
Collecting google-auth<2.0dev,>=1.25.0
Downloading google_auth-1.35.0-py2.py3-none-any.whl (152 kB)
---------------------------------------- 152.9/152.9 kB 4.6 MB/s eta 0:00:00
Collecting googleapis-common-protos<2.0dev,>=1.6.0
Downloading googleapis_common_protos-1.56.4-py2.py3-none-any.whl (211 kB)
---------------------------------------- 211.7/211.7 kB 12.6 MB/s eta 0:00:00
Requirement already satisfied: setuptools>=40.3.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from google-api-core[grpc]<2.0.0dev,>=1.14.0->google-cloud-vision==1.0.0->ocrpy) (62.3.3)
Collecting protobuf<4.0.0dev,>=3.12.0
Using cached protobuf-3.20.1-cp38-cp38-win_amd64.whl (904 kB)
Collecting grpcio<2.0dev,>=1.29.0
Downloading grpcio-1.47.0-cp38-cp38-win_amd64.whl (3.6 MB)
---------------------------------------- 3.6/3.6 MB 4.7 MB/s eta 0:00:00
Requirement already satisfied: pyparsing>=2.0.2 in c:\users\user_\appdata\roaming\python\python38\site-packages (from packaging>=20.0->transformers==4.20.1->ocrpy) (3.0.9)
Collecting jarowinkler<2.0.0,>=1.2.0
Downloading jarowinkler-1.2.1-cp38-cp38-win_amd64.whl (61 kB)
---------------------------------------- 61.9/61.9 kB 1.6 MB/s eta 0:00:00
Requirement already satisfied: charset-normalizer<3,>=2 in c:\users\user_\appdata\roaming\python\python38\site-packages (from requests->farm-haystack==1.6.0->ocrpy) (2.1.0)
Requirement already satisfied: idna<4,>=2.5 in c:\users\user_\appdata\roaming\python\python38\site-packages (from requests->farm-haystack==1.6.0->ocrpy) (3.3)
Collecting threadpoolctl>=2.0.0
Using cached threadpoolctl-3.1.0-py3-none-any.whl (14 kB)
Collecting joblib>=1.0.0
Using cached joblib-1.1.0-py2.py3-none-any.whl (306 kB)
Collecting sentencepiece
Downloading sentencepiece-0.1.97-cp38-cp38-win_amd64.whl (1.1 MB)
---------------------------------------- 1.1/1.1 MB 4.2 MB/s eta 0:00:00
Collecting importlib-resources>=1.4.0
Downloading importlib_resources-5.9.0-py3-none-any.whl (33 kB)
Collecting pkgutil-resolve-name>=1.3.10
Downloading pkgutil_resolve_name-1.3.10-py3-none-any.whl (4.7 kB)
Collecting pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0
Using cached pyrsistent-0.18.1-cp38-cp38-win_amd64.whl (61 kB)
Requirement already satisfied: Flask<3 in c:\users\user_\appdata\roaming\python\python38\site-packages (from mlflow->farm-haystack==1.6.0->ocrpy) (2.2.0)
Collecting entrypoints<1
Using cached entrypoints-0.4-py3-none-any.whl (5.3 kB)
Collecting databricks-cli<1,>=0.8.7
Downloading databricks-cli-0.17.1.tar.gz (77 kB)
---------------------------------------- 77.2/77.2 kB 4.2 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Requirement already satisfied: sqlalchemy<2,>=1.4.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from mlflow->farm-haystack==1.6.0->ocrpy) (1.4.39)
Collecting waitress<3
Using cached waitress-2.1.2-py3-none-any.whl (57 kB)
Collecting sqlparse<1,>=0.4.0
Using cached sqlparse-0.4.2-py3-none-any.whl (42 kB)
Collecting gitpython<4,>=2.1.0
Downloading GitPython-3.1.27-py3-none-any.whl (181 kB)
---------------------------------------- 181.2/181.2 kB 5.5 MB/s eta 0:00:00
Requirement already satisfied: click<9,>=7.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from mlflow->farm-haystack==1.6.0->ocrpy) (8.1.3)
Collecting alembic<2
Downloading alembic-1.8.1-py3-none-any.whl (209 kB)
---------------------------------------- 209.8/209.8 kB 12.5 MB/s eta 0:00:00
Collecting docker<6,>=4.0.0
Using cached docker-5.0.3-py2.py3-none-any.whl (146 kB)
Collecting prometheus-flask-exporter<1
Downloading prometheus_flask_exporter-0.20.3-py3-none-any.whl (18 kB)
Requirement already satisfied: importlib-metadata!=4.7.0,<5,>=3.7.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from mlflow->farm-haystack==1.6.0->ocrpy) (4.12.0)
Collecting cloudpickle<3
Using cached cloudpickle-2.1.0-py3-none-any.whl (25 kB)
Collecting querystring-parser<2
Downloading querystring_parser-1.2.4-py2.py3-none-any.whl (7.9 kB)
Collecting backoff<2.0.0,>=1.10.0
Downloading backoff-1.11.1-py2.py3-none-any.whl (13 kB)
Collecting monotonic>=1.5
Using cached monotonic-1.6-py2.py3-none-any.whl (8.2 kB)
Collecting lxml>=2.3.2
Downloading lxml-4.9.1-cp38-cp38-win_amd64.whl (3.6 MB)
---------------------------------------- 3.6/3.6 MB 4.7 MB/s eta 0:00:00
Collecting num2words
Downloading num2words-0.5.11-py3-none-any.whl (116 kB)
---------------------------------------- 116.3/116.3 kB 7.1 MB/s eta 0:00:00
Collecting inflect
Downloading inflect-6.0.0-py3-none-any.whl (34 kB)
Collecting Mako
Downloading Mako-1.2.1-py3-none-any.whl (78 kB)
---------------------------------------- 78.6/78.6 kB 4.3 MB/s eta 0:00:00
Collecting pyjwt>=1.7.0
Using cached PyJWT-2.4.0-py3-none-any.whl (18 kB)
Collecting oauthlib>=3.1.0
Using cached oauthlib-3.2.0-py3-none-any.whl (151 kB)
Collecting tabulate>=0.7.7
Using cached tabulate-0.8.10-py3-none-any.whl (29 kB)
Collecting pywin32==227
Using cached pywin32-227-cp38-cp38-win_amd64.whl (9.1 MB)
Collecting websocket-client>=0.32.0
Using cached websocket_client-1.3.3-py3-none-any.whl (54 kB)
Requirement already satisfied: Werkzeug>=2.2.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from Flask<3->mlflow->farm-haystack==1.6.0->ocrpy) (2.2.1)
Requirement already satisfied: itsdangerous>=2.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from Flask<3->mlflow->farm-haystack==1.6.0->ocrpy) (2.1.2)
Requirement already satisfied: Jinja2>=3.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from Flask<3->mlflow->farm-haystack==1.6.0->ocrpy) (3.1.2)
Collecting gitdb<5,>=4.0.1
Downloading gitdb-4.0.9-py3-none-any.whl (63 kB)
---------------------------------------- 63.1/63.1 kB 3.3 MB/s eta 0:00:00
Collecting rsa<5,>=3.1.4
Downloading rsa-4.9-py3-none-any.whl (34 kB)
Collecting pyasn1-modules>=0.2.1
Using cached pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
Collecting cachetools<5.0,>=2.0.0
Using cached cachetools-4.2.4-py3-none-any.whl (10 kB)
Requirement already satisfied: zipp>=0.5 in c:\users\user_\appdata\roaming\python\python38\site-packages (from importlib-metadata!=4.7.0,<5,>=3.7.0->mlflow->farm-haystack==1.6.0->ocrpy) (3.8.1)
Collecting isodate>=0.6.0
Using cached isodate-0.6.1-py2.py3-none-any.whl (41 kB)
Collecting requests-oauthlib>=0.5.0
Using cached requests_oauthlib-1.3.1-py2.py3-none-any.whl (23 kB)
Collecting msrest>=0.6.21
Downloading msrest-0.6.21-py2.py3-none-any.whl (85 kB)
---------------------------------------- 85.2/85.2 kB 4.7 MB/s eta 0:00:00
Collecting prometheus-client
Downloading prometheus_client-0.14.1-py3-none-any.whl (59 kB)
---------------------------------------- 59.5/59.5 kB 1.6 MB/s eta 0:00:00
Requirement already satisfied: greenlet!=0.4.17 in c:\users\user_\appdata\roaming\python\python38\site-packages (from sqlalchemy<2,>=1.4.0->mlflow->farm-haystack==1.6.0->ocrpy) (1.1.2)
Collecting docopt>=0.6.2
Using cached docopt-0.6.2.tar.gz (25 kB)
Preparing metadata (setup.py) ... done
Collecting smmap<6,>=3.0.1
Downloading smmap-5.0.0-py3-none-any.whl (24 kB)
Requirement already satisfied: MarkupSafe>=2.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from Jinja2>=3.0->Flask<3->mlflow->farm-haystack==1.6.0->ocrpy) (2.1.1)
Collecting pyasn1<0.5.0,>=0.4.6
Using cached pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Building wheels for collected packages: pytesseract, sentence-transformers, elastic-apm, python-docx, seqeval, tika, databricks-cli, docopt
Building wheel for pytesseract (setup.py) ... done
Created wheel for pytesseract: filename=pytesseract-0.3.6-py2.py3-none-any.whl size=13617 sha256=7db3e1624fc167d1416490496bfac2183bd490bdd0a6cb27fe8bd9cd0b6258f9
Stored in directory: c:\users\user_\appdata\local\pip\cache\wheels\be\c9\54\c3a5693600be95ece493b981ae104c94e1a2c4d3e434438810
Building wheel for sentence-transformers (setup.py) ... done
Created wheel for sentence-transformers: filename=sentence_transformers-2.2.2-py3-none-any.whl size=125925 sha256=a856fc86fff35ca0fc6f6bec3794e16261bb322a71221bf070735a45bbd4d9eb
Stored in directory: c:\users\user_\appdata\local\pip\cache\wheels\5e\6f\8c\d88aec621f3f542d26fac0342bef5e693335d125f4e54aeffe
Building wheel for elastic-apm (pyproject.toml) ... done
Created wheel for elastic-apm: filename=elastic_apm-6.11.0-cp38-cp38-win_amd64.whl size=343119 sha256=36e0c8eeb98ddcf49d9a1ac939256be670446733b6cedb1e9357973d4f3b6c38
Stored in directory: c:\users\user_\appdata\local\pip\cache\wheels\6e\ae\89\fd6dd0c1c8283f3ebf4e44059df5fd025202b8ae1d540ad4eb
Building wheel for python-docx (setup.py) ... done
Created wheel for python-docx: filename=python_docx-0.8.11-py3-none-any.whl size=184489 sha256=bcb3a8c9e0a606cea0f598b79f7025f8271e8e02f776b92b3b6c7308fa926a22
Stored in directory: c:\users\user_\appdata\local\pip\cache\wheels\32\b8\b2\c4c2b95765e615fe139b0b17b5ea7c0e1b6519b0a9ec8fb34d
Building wheel for seqeval (setup.py) ... done
Created wheel for seqeval: filename=seqeval-1.2.2-py3-none-any.whl size=16165 sha256=db0bb7bf6959f5ced9158d9d85caee0083b4b09c9c0887f3c36728c3def2ac22
Stored in directory: c:\users\user_\appdata\local\pip\cache\wheels\ad\5c\ba\05fa33fa5855777b7d686e843ec07452f22a66a138e290e732
Building wheel for tika (setup.py) ... done
Created wheel for tika: filename=tika-1.24-py3-none-any.whl size=32876 sha256=ed1538a09fcfcc59973cad728aa99a1d6d5235d75be7fc72b9baef0e9f24f113
Stored in directory: c:\users\user_\appdata\local\pip\cache\wheels\75\66\8b\d1acbac7d49f3d98ade76c51ae5d72cec1866131a3b1ad9f82
Building wheel for databricks-cli (setup.py) ... done
Created wheel for databricks-cli: filename=databricks_cli-0.17.1-py3-none-any.whl size=138385 sha256=1b94eda5a9228718d6ce9978709683a30c7074a25f41fa0db2170c4df3b908d2
Stored in directory: c:\users\user_\appdata\local\pip\cache\wheels\56\39\f0\5bda73e2f6885f39eb07ccb5d3af64edb0ca6b23489a652c0f
Building wheel for docopt (setup.py) ... done
Created wheel for docopt: filename=docopt-0.6.2-py2.py3-none-any.whl size=13706 sha256=a68a154440e86d9c99962139812b018587da9a102562e3c19e8ab2487312d8d8
Stored in directory: c:\users\user_\appdata\local\pip\cache\wheels\56\ea\58\ead137b087d9e326852a851351d1debf4ada529b6ac0ec4e8c
Successfully built pytesseract sentence-transformers elastic-apm python-docx seqeval tika databricks-cli docopt
Installing collected packages: tokenizers, sentencepiece, pywin32, pytz, python-dotenv, pyasn1, monotonic, mmh3, docopt, azure-common, websocket-client, waitress, torch, threadpoolctl, tabulate, sqlparse, soupsieve, smmap, rsa, regex, querystring-parser, pyyaml, pyrsistent, pyjwt, pyasn1-modules, protobuf, prometheus-client, pkgutil-resolve-name, pillow, oauthlib, numpy, num2words, networkx, more-itertools, Mako, lxml, langdetect, joblib, jmespath, jarowinkler, isodate, importlib-resources, grpcio, entrypoints, elasticsearch, elastic-apm, dill, cloudpickle, cloudpathlib, cachetools, backoff, torchvision, tika, scipy, requests-oauthlib, rapidfuzz, python-docx, pytesseract, posthog, pdf2image, pandas, opencv-python, nltk, jsonschema, inflect, huggingface-hub, googleapis-common-protos, google-auth, gitdb, docker, databricks-cli, botocore, beautifulsoup4, azure-core, alembic, transformers, scikit-learn, s3transfer, quantulum3, prometheus-flask-exporter, msrest, google-api-core, gitpython, seqeval, sentence-transformers, mlflow, boto3, azure-ai-formrecognizer, google-cloud-vision, farm-haystack, ocrpy
Attempting uninstall: pywin32
Found existing installation: pywin32 225
Uninstalling pywin32-225:
Successfully uninstalled pywin32-225
Attempting uninstall: numpy
Found existing installation: numpy 1.23.1
Uninstalling numpy-1.23.1:
Successfully uninstalled numpy-1.23.1
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
mpire 2.5.0 requires pywin32==225; platform_system == "Windows", but you have pywin32 227 which is incompatible.
Successfully installed Mako-1.2.1 alembic-1.8.1 azure-ai-formrecognizer-3.2.0b2 azure-common-1.1.28 azure-core-1.22.1 backoff-1.11.1 beautifulsoup4-4.9.1 boto3-1.19.7 botocore-1.22.12 cachetools-4.2.4 cloudpathlib-0.9.0 cloudpickle-2.1.0 databricks-cli-0.17.1 dill-0.3.5.1 docker-5.0.3 docopt-0.6.2 elastic-apm-6.11.0 elasticsearch-7.10.1 entrypoints-0.4 farm-haystack-1.6.0 gitdb-4.0.9 gitpython-3.1.27 google-api-core-1.32.0 google-auth-1.35.0 google-cloud-vision-1.0.0 googleapis-common-protos-1.56.4 grpcio-1.47.0 huggingface-hub-0.7.0 importlib-resources-5.9.0 inflect-6.0.0 isodate-0.6.1 jarowinkler-1.2.1 jmespath-0.10.0 joblib-1.1.0 jsonschema-4.9.1 langdetect-1.0.9 lxml-4.9.1 mlflow-1.28.0 mmh3-3.0.0 monotonic-1.6 more-itertools-8.14.0 msrest-0.6.21 networkx-2.8.5 nltk-3.7 num2words-0.5.11 numpy-1.21.1 oauthlib-3.2.0 ocrpy-0.3.9 opencv-python-4.1.2.30 pandas-1.3.3 pdf2image-1.14.0 pillow-9.2.0 pkgutil-resolve-name-1.3.10 posthog-2.1.0 prometheus-client-0.14.1 prometheus-flask-exporter-0.20.3 protobuf-3.20.1 pyasn1-0.4.8 pyasn1-modules-0.2.8 pyjwt-2.4.0 pyrsistent-0.18.1 pytesseract-0.3.6 python-docx-0.8.11 python-dotenv-0.17.1 pytz-2022.2.1 pywin32-227 pyyaml-6.0 quantulum3-0.7.10 querystring-parser-1.2.4 rapidfuzz-2.4.3 regex-2022.7.25 requests-oauthlib-1.3.1 rsa-4.9 s3transfer-0.5.2 scikit-learn-1.1.2 scipy-1.9.0 sentence-transformers-2.2.2 sentencepiece-0.1.97 seqeval-1.2.2 smmap-5.0.0 soupsieve-2.3.2.post1 sqlparse-0.4.2 tabulate-0.8.10 threadpoolctl-3.1.0 tika-1.24 tokenizers-0.12.1 torch-1.10.2 torchvision-0.11.3 transformers-4.20.1 waitress-2.1.2 websocket-client-1.3.3

Enterキーを押すと、インストールが開始され、上記のように「Successfully installed」と表示されます。これが表示されれば、ocrpyが正常にインストールされたことになりますが、今回は「ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.(ERROR: pip の依存性解決は現在インストールされているすべてのパッケージを考慮に入れていません。この動作が、以下のような依存関係の衝突の原因となっています。

mpire 2.5.0 requires pywin32==225; platform_system == “Windows”, but you have pywin32 227 which is incompatible.」というエラーが出力された。依存関係の衝突が原因であり、このようなエラーが出力される場合は、仮想環境を構築し、インストールすることを推奨する。

コメント

タイトルとURLをコピーしました