New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The way to install VikParuchuri/marker on Windows 10. #12
Comments
In the process of converting multiple files (convert.py), I found that the ray package was missing. pip install ray==2.7.1 |
can be installed using pinokio as it seems convenient method? |
this would be great, or something similar. the above process is way too complicated for the average user. unless it wasn't meant for windows users .. |
Thank you for documenting these steps! I think I may have caused some confusion here - I'll remove |
Hi, could you please clarify for me which of the steps above will be replaced by doing |
@SimonB97 I don't have windows, so I can't test, but |
Is there any way to make the installation run through docker? Having a complete image should alleviate a lot of the manual work, but I'm not quite sure how nvcc runs on Windows via docker desktop. The only way I know of is to use the NVIDIA tools kit image as the base image. |
Need some help. I am on a Windows 10 machine. (bsrp310) C:\Users\Starlord\marker>pip show pydantic (bsrp310) C:\Users\Starlord\marker>python convert_single.py .\6941.pdf .\6941_converted.md --parallel_factor 2 --max_pages 10 |
The |
Thanks for the reply. The pydantic version I have came with Label Studio, which I am using for image annotation, I think I'll have to start over by creating a new virtual environment to avoid conflict. Thanks again! |
This time I tried with poetry. Everything seems to have gone ok. However, when I tried to run convert_single.py, I am getting the following error, towards the bottom of the page: (marker-py3.10) (base) C:\Users\Starlord\marker>python convert_single.py .\6941.pdf .\6941_output.md --parallel_factor 2 --max_pages 10 |
This is a system requirement (see the brew packages that need to be installed). I don't know how to install this on windows, but it should be possible. You'll need to install the other system requirements, too. |
Thanks @VikParuchuri -- I will look into it. |
I used Install requirements: scoop install python39
pip install poetry
scoop install ghostscript tesseract Get the git clone https://github.com/tesseract-ocr/tessdata_best Then: git clone https://github.com/VikParuchuri/marker
cd marker
python(39) -m venv venv
venv\Scripts\activate.bat
poetry install I used GPU, so: pip uninstall torch Install CUDA, then install the corresponding version of torch. I used Create the
Then: python convert_single.py in.pdf out.md It tell me to Enable your device for development. Finally, it said something else, but work well: Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.
D:\binr\pdf_marker\venv\lib\site-packages\torch\functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at C:\actions-runner\_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\TensorShape.cpp:3527.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined] |
I am having issues when running poetry install
|
The most challenging aspect of installing Marker on Windows lies in the detectron2 package developed by Facebook Research. Facebook Research is not very Windows-friendly, and they basically do not support or provide installation guidance for Windows.
The following records the process of installing VikParuchuri/marker on Windows 10.
To install the detectron2 package on Windows, you need to clone detectron2 and make some modifications before installation:
Compilation of detectron2 requires a C/C++ compiler. I have MSVC (Visual Studio 2022) cl.exe in my environment, and you must have a similar C/C++ compiler in your environment.
Visual Studio Download: https://visualstudio.microsoft.com/vs/community/
Compilation of detectron2 requires NVIDIA CUDA's nvcc. You must install the CUDA Toolkit first. I installed version 12.3.
CUDA Toolkit Download: https://developer.nvidia.com/cuda-downloads
The torch package may also need to be installed. I installed the latest version provided by PyTorch:
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
Install wheel:
pip install wheel
Clone detectron2:
git clone https://github.com/facebookresearch/detectron2.git
Fix the "identifier 'single_box_iou_rotated' is undefined" issue by Viliami. (Refer to: nvcc.exe failed with exit status 1: Problem installing detectron2 on Windows 10 facebookresearch/detectron2#1601 (comment))
Install the local detectron2.
Install detectron2: pip install -e detectron2
If everything goes smoothly, detectron2 should be installed. If there are any issues, you'll need to check the error logs for further investigation.
Installing the Windows version of Tesseract and Ghostscript.
To install Tesseract OCR on Windows
setup tesseract-ocr-w64-setup-5.3.3.20231005.exe or a newer version
https://digi.bib.uni-mannheim.de/tesseract/
To install Ghostscript on Windows
setup gs10021w64.exe or a newer version
https://ghostscript.readthedocs.io/en/gs10.02.0/Install.html
Installing the VikParuchuri/marker
pip install nougat-ocr
pip install -r requirements.txt
pip install ftfy
pip install spellchecker
pip install pyspellchecker
pip install ocrmypdf
pip install nltk
pip install thefuzz
pip uninstall python-magic
pip install python-magic-bin
The text was updated successfully, but these errors were encountered: