LlamaParse dependency issue #470

Closed
opened 2026-02-16 00:17:56 -05:00 by yindo · 6 comments
Owner

Originally created by @leehuwuj on GitHub (May 8, 2025).

Describe the bug
I got a LlamaParse import issue if i just use a single llama-index package.

❯ uv run -- test.py

Reading inline script metadata from `test.py`
Installed 83 packages in 256ms
Traceback (most recent call last):
  File "/private/tmp/test/test.py", line 7, in <module>
    from llama_parse import LlamaParse
  File "/Users/huu/.cache/uv/archive-v0/CnK4-pXu-TwO2no_I-zM7/lib/python3.10/site-packages/llama_parse/__init__.py", line 1, in <module>
    from llama_cloud_services.parse import LlamaParse, ResultType
  File "/Users/huu/.cache/uv/archive-v0/CnK4-pXu-TwO2no_I-zM7/lib/python3.10/site-packages/llama_cloud_services/__init__.py", line 3, in <module>
    from llama_cloud_services.extract import LlamaExtract, ExtractionAgent
  File "/Users/huu/.cache/uv/archive-v0/CnK4-pXu-TwO2no_I-zM7/lib/python3.10/site-packages/llama_cloud_services/extract/__init__.py", line 1, in <module>
    from llama_cloud_services.extract.extract import (
  File "/Users/huu/.cache/uv/archive-v0/CnK4-pXu-TwO2no_I-zM7/lib/python3.10/site-packages/llama_cloud_services/extract/extract.py", line 11, in <module>
    from llama_cloud import (
ImportError: cannot import name 'ExtractAgentCreate' from 'llama_cloud' (/Users/huu/.cache/uv/archive-v0/CnK4-pXu-TwO2no_I-zM7/lib/python3.10/site-packages/llama_cloud/__init__.py)

My test.py:

# /// script
# dependencies = [
#     "llama-index"
# ]
# ///

from llama_parse import LlamaParse

__all__ = ["LlamaParse"]

I noticed that somehow the llama-cloud-services package is not resolved correctly. Here is the resolved packages from llama-index:

llama-cloud                             0.1.20
llama-cloud-services                    0.6.15
llama-index                             0.12.34
llama-index-agent-openai                0.4.7
llama-index-cli                         0.4.1
llama-index-core                        0.12.34.post1
llama-index-embeddings-openai           0.3.1
llama-index-indices-managed-llama-cloud 0.6.11
llama-index-llms-openai                 0.3.38
llama-index-multi-modal-llms-openai     0.4.3
llama-index-program-openai              0.3.1
llama-index-question-gen-openai         0.3.0
llama-index-readers-file                0.4.7
llama-index-readers-llama-parse         0.4.0
llama-parse                             0.6.12 

where the llama-parse=0.6.12 while llama-cloud-services=0.6.15.

It's fine if i specify the llama-parse package explicitly, e.g:

# /// script
# dependencies = [
#     "llama-index",
#     "llama-parse"
# ]
# ///

from llama_parse import LlamaParse

__all__ = ["LlamaParse"]

Is it a constraint package issue in the llama_cloud_services package or from the llama-index-readers-llama-parse package?

Originally created by @leehuwuj on GitHub (May 8, 2025). **Describe the bug** I got a LlamaParse import issue if i just use a single `llama-index` package. ```shell ❯ uv run -- test.py Reading inline script metadata from `test.py` Installed 83 packages in 256ms Traceback (most recent call last): File "/private/tmp/test/test.py", line 7, in <module> from llama_parse import LlamaParse File "/Users/huu/.cache/uv/archive-v0/CnK4-pXu-TwO2no_I-zM7/lib/python3.10/site-packages/llama_parse/__init__.py", line 1, in <module> from llama_cloud_services.parse import LlamaParse, ResultType File "/Users/huu/.cache/uv/archive-v0/CnK4-pXu-TwO2no_I-zM7/lib/python3.10/site-packages/llama_cloud_services/__init__.py", line 3, in <module> from llama_cloud_services.extract import LlamaExtract, ExtractionAgent File "/Users/huu/.cache/uv/archive-v0/CnK4-pXu-TwO2no_I-zM7/lib/python3.10/site-packages/llama_cloud_services/extract/__init__.py", line 1, in <module> from llama_cloud_services.extract.extract import ( File "/Users/huu/.cache/uv/archive-v0/CnK4-pXu-TwO2no_I-zM7/lib/python3.10/site-packages/llama_cloud_services/extract/extract.py", line 11, in <module> from llama_cloud import ( ImportError: cannot import name 'ExtractAgentCreate' from 'llama_cloud' (/Users/huu/.cache/uv/archive-v0/CnK4-pXu-TwO2no_I-zM7/lib/python3.10/site-packages/llama_cloud/__init__.py) ``` My test.py: ```python # /// script # dependencies = [ # "llama-index" # ] # /// from llama_parse import LlamaParse __all__ = ["LlamaParse"] ``` I noticed that somehow the llama-cloud-services package is not resolved correctly. Here is the resolved packages from llama-index: ``` llama-cloud 0.1.20 llama-cloud-services 0.6.15 llama-index 0.12.34 llama-index-agent-openai 0.4.7 llama-index-cli 0.4.1 llama-index-core 0.12.34.post1 llama-index-embeddings-openai 0.3.1 llama-index-indices-managed-llama-cloud 0.6.11 llama-index-llms-openai 0.3.38 llama-index-multi-modal-llms-openai 0.4.3 llama-index-program-openai 0.3.1 llama-index-question-gen-openai 0.3.0 llama-index-readers-file 0.4.7 llama-index-readers-llama-parse 0.4.0 llama-parse 0.6.12 ``` where the `llama-parse=0.6.12` while `llama-cloud-services=0.6.15`. It's fine if i specify the llama-parse package explicitly, e.g: ```python # /// script # dependencies = [ # "llama-index", # "llama-parse" # ] # /// from llama_parse import LlamaParse __all__ = ["LlamaParse"] ``` Is it a constraint package issue in the `llama_cloud_services` package or from the `llama-index-readers-llama-parse` package?
yindo added the bug label 2026-02-16 00:17:56 -05:00
yindo closed this issue 2026-02-16 00:17:56 -05:00
Author
Owner

@logan-markewich commented on GitHub (May 8, 2025):

@leehuwuj I think you need to pip install -U llama-cloud ? I see you also have an old version of llama-cloud-services, so maybe pip install -U llama-cloud llama-cloud-services -- we hardcode the llama-cloud dep in the latest versions

@logan-markewich commented on GitHub (May 8, 2025): @leehuwuj I think you need to `pip install -U llama-cloud` ? I see you also have an old version of llama-cloud-services, so maybe `pip install -U llama-cloud llama-cloud-services` -- we hardcode the llama-cloud dep in the latest versions
Author
Owner

@superRookie007 commented on GitHub (May 11, 2025):

I have the same issue when importing LlamaParse from llama-cloud-services

@superRookie007 commented on GitHub (May 11, 2025): I have the same issue when importing LlamaParse from llama-cloud-services
Author
Owner

@leehuwuj commented on GitHub (May 11, 2025):

@logan-markewich I guess the issue is that the pinned version of llama-cloud-services and llama-parse in llama-index-readers-llama-parse is causing the package manager to resolve a conflict between their versions. As the llama-index-readers-llama-parse is included in the llama-index package so that why i got the issue if i just use llama-index package.
So, i guess bumping the dependencies version in llama-index-readers-llama-parse could fix the problem.
Otherwise, users will have to explicitly include the llama-cloud and llama-cloud-services packages as your suggestion.

@leehuwuj commented on GitHub (May 11, 2025): @logan-markewich I guess the issue is that the pinned version of `llama-cloud-services` and `llama-parse` in `llama-index-readers-llama-parse` is causing the package manager to resolve a conflict between their versions. As the `llama-index-readers-llama-parse` is included in the `llama-index` package so that why i got the issue if i just use `llama-index` package. So, i guess bumping the dependencies version in `llama-index-readers-llama-parse` could fix the problem. Otherwise, users will have to explicitly include the `llama-cloud` and `llama-cloud-services` packages as your suggestion.
Author
Owner

@leehuwuj commented on GitHub (May 11, 2025):

@superRookie007 What versions of llama-parse and llama-cloud-services are you using?

@leehuwuj commented on GitHub (May 11, 2025): @superRookie007 What versions of `llama-parse` and `llama-cloud-services` are you using?
Author
Owner

@superRookie007 commented on GitHub (May 11, 2025):

@leehuwuj
llama-parse is "0.6.12"
llama-cloud-services is "0.6.15"

I just updated them to the latest versions - haven't played around with changing the versions

@superRookie007 commented on GitHub (May 11, 2025): @leehuwuj llama-parse is "0.6.12" llama-cloud-services is "0.6.15" I just updated them to the latest versions - haven't played around with changing the versions
Author
Owner

@leehuwuj commented on GitHub (May 22, 2025):

Closed as the latest version no longer has this issue!

@leehuwuj commented on GitHub (May 22, 2025): Closed as the latest version no longer has this issue!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/llama_cloud_services#470