deepseek-ai / deepseek-ai/DeepSeek-OCR-2
Errors during installation (Ubuntu 24.04)
- Dominant language
- Python
- Stars
- 3.4k
- Forks
- 306
- PR merge metrics
- No merged PRs in 30d
Description
Followed step-by-step the installation indications found here: https://github.com/deepseek-ai/DeepSeek-OCR-2?tab=readme-ov-file#install
(deepseek-ocr2) raphy@raohy:~/DeepSeek-OCR-2$ pip install -r requirements.txt
Using cached img2pdf-0.6.3-py3-none-any.whl (49 kB)
Using cached easydict-1.13-py3-none-any.whl (6.8 kB)
Using cached addict-2.4.0-py3-none-any.whl (3.8 kB)
Using cached pikepdf-10.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.7 MB)
Using cached lxml-6.0.2-cp312-cp312-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl (5.3 MB)
Installing collected packages: easydict, addict, PyMuPDF, lxml, pikepdf, huggingface-hub, tokenizers, img2pdf, transformers
Attempting uninstall: huggingface-hub
Found existing installation: huggingface_hub 1.4.1
Uninstalling huggingface_hub-1.4.1:
Successfully uninstalled huggingface_hub-1.4.1
Attempting uninstall: tokenizers
Found existing installation: tokenizers 0.22.2
Uninstalling tokenizers-0.22.2:
Successfully uninstalled tokenizers-0.22.2
Attempting uninstall: transformers
Found existing installation: transformers 5.1.0
Uninstalling transformers-5.1.0:
Successfully uninstalled transformers-5.1.0
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.
vllm 0.8.5+cu118 requires tokenizers>=0.21.1, but you have tokenizers 0.20.3 which is incompatible.
vllm 0.8.5+cu118 requires transformers>=4.51.1, but you have transformers 4.46.3 which is incompatible.
Successfully installed PyMuPDF-1.27.1 addict-2.4.0 easydict-1.13 huggingface-hub-0.36.2 img2pdf-0.6.3 lxml-6.0.2 pikepdf-10.3.0 tokenizers-0.20.3 transformers-4.46.3
(deepseek-ocr2) raphy@raohy:~/DeepSeek-OCR-2$ pip install flash-attn==2.7.3 --no-build-isolation
Collecting flash-attn==2.7.3
Using cached flash_attn-2.7.3.tar.gz (3.2 MB)
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [34 lines of output]
/home/raphy/miniconda3/envs/deepseek-ocr2/lib/python3.12/site-packages/wheel/bdist_wheel.py:4: FutureWarning: The 'wheel' package is no longer the canonical location of the 'bdist_wheel' command, and will be removed in a future release. Please update to setuptools v70.1 or later which contains an integrated version of this command.
warn(
fatal: not a git repository (or any of the parent directories): .git
:106: UserWarning: flash_attn was requested, but nvcc was not found. Are you sure your environment has nvcc available? If you're installing within a container from https://hub.docker.com/r/pytorch/pytorch, only images whose names contain 'devel' will provide nvcc.
torch.__version__ = 2.6.0+cu118
Traceback (most recent call last):
File "/home/raphy/miniconda3/envs/deepseek-ocr2/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in
main()
File "/home/raphy/miniconda3/envs/deepseek-ocr2/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
json_out["return_val"] = hook(**hook_input["kwargs"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/raphy/miniconda3/envs/deepseek-ocr2/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 175, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/raphy/miniconda3/envs/deepseek-ocr2/lib/python3.12/site-packages/setuptools/build_meta.py", line 378, in prepare_metadata_for_build_wheel
self.run_setup()
File "/home/raphy/miniconda3/envs/deepseek-ocr2/lib/python3.12/site-packages/setuptools/build_meta.py", line 518, in run_setup
super().run_setup(setup_script=setup_script)
File "/home/raphy/miniconda3/envs/deepseek-ocr2/lib/python3.12/site-packages/setuptools/build_meta.py", line 317, in run_setup
exec(code, locals())
File "", line 190, in
File "/home/raphy/miniconda3/envs/deepseek-ocr2/lib/python3.12/site-packages/torch/utils/cpp_extension.py", line 1130, in CUDAExtension
library_dirs += library_paths(device_type="cuda")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/raphy/miniconda3/envs/deepseek-ocr2/lib/python3.12/site-packages/torch/utils/cpp_extension.py", line 1264, in library_paths
if (not os.path.exists(_join_cuda_home(lib_dir)) and
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/raphy/miniconda3/envs/deepseek-ocr2/lib/python3.12/site-packages/torch/utils/cpp_extension.py", line 2525, in _join_cuda_home
raise OSError('CUDA_HOME environment variable is not set. '
OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.
[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.
╰─> flash-attn
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.