Skip to content
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

[BUG] [VSCode Extension] Package not installed #2024

Closed
tvanvalkenburg opened this issue Feb 16, 2024 · 20 comments
Closed

[BUG] [VSCode Extension] Package not installed #2024

tvanvalkenburg opened this issue Feb 16, 2024 · 20 comments
Assignees
Labels
bug Something isn't working

Comments

@tvanvalkenburg
Copy link

I am getting an error saying "Can't find tool promptflow_vectordb.tool.common_index_lookup.search". The image below shows that the package is installed, along with promptflow and promptflow-tools. The text printed to the terminal is the output of pip list in the same virtual environment in which the flow is being executed.

image

Running on Mac OS Sonoma 14.3.1.

@tvanvalkenburg tvanvalkenburg added the bug Something isn't working label Feb 16, 2024
@Kevinlee49
Copy link

It seems to be a duplicate of #788

And if you use the Vector Index Lookup tool, it has been deprecated. Therefore, I recommend you to upgrade to the new index lookup tool.

It is well written in this link.
https://learn.microsoft.com/en-us/azure/ai-studio/how-to/prompt-flow-tools/index-lookup-tool

@D-W-
Copy link
Contributor

D-W- commented Feb 19, 2024

Hi @dans-msft @Adarsh-Ramanathan , could you help confirm @Kevinlee49's comment? Thanks!

@tvanvalkenburg
Copy link
Author

It seems to be a duplicate of #788

And if you use the Vector Index Lookup tool, it has been deprecated. Therefore, I recommend you to upgrade to the new index lookup tool.

It is well written in this link. https://learn.microsoft.com/en-us/azure/ai-studio/how-to/prompt-flow-tools/index-lookup-tool

I believe that I am using the index lookup tool. My code is below:

- name: lookup_question_from_indexed_docs
  type: python
  source:
    type: package
    tool: promptflow_vectordb.tool.common_index_lookup.search

This is the code that is auto-generated in the Studio when adding an IndexLookup:

image

image

@Kevinlee49
Copy link

My index lookup looks like this

image

@Adarsh-Ramanathan
Copy link

@tvanvalkenburg, can you share the full output of running pip list? I suspect you're missing one or more dependencies - maybe from forgetting to install promptflow-vectordb's azure exta? Running pf tool list and looking for errors in the output could also be useful.

@tvanvalkenburg
Copy link
Author

@tvanvalkenburg, can you share the full output of running pip list? I suspect you're missing one or more dependencies - maybe from forgetting to install promptflow-vectordb's azure exta? Running pf tool list and looking for errors in the output could also be useful.

The output of pip list is attached.
piplist.txt

@Adarsh-Ramanathan
Copy link

@tvanvalkenburg - can you also run pf tool list and share the output?

@tvanvalkenburg
Copy link
Author

I've attached the output
pf_tool_list.txt

@Adarsh-Ramanathan
Copy link

@tvanvalkenburg , can you run pip install promptflow-vectordb[azure] and see if that resolves your issue?

@tvanvalkenburg
Copy link
Author

I tried this previously and got an error. I've tried it again just now to confirm:

image

@Adarsh-Ramanathan
Copy link

Adarsh-Ramanathan commented Feb 26, 2024

This is the likely source of the issue that you're seeing. What python version are you using?

@tvanvalkenburg
Copy link
Author

In this environment I am runnning 3.11.6.

@Adarsh-Ramanathan
Copy link

Adarsh-Ramanathan commented Feb 27, 2024

That's strange - I ran pip install promptflow-vectordb[azure] in a python 3.11.6 container to verify, and it does work for me. Do you have a custom index source configuration in your environment, by any chance?

In any case, based on your pip list output, the only packages you're missing from the azure extra are azure-keyvault and azureml-rag. Can you try manually installing them?

azure.keyvault>=4.2.0
azureml.rag[azure,azure_cosmos_mongo_vcore,cognitive_search,faiss,milvus,pinecone]>=0.2.23

@tvanvalkenburg
Copy link
Author

So I think we may be onto something.

Firstly, I have been using Python installed through pyenv. I think that this may be the cause of problem related to not being able to find promptflow-vectordb[azure].

I've tried installing the packages in a container build on the official Python 3.11.6 image, and pip is able to find the packages. However, when trying to run the install I get the following error:

image

@Adarsh-Ramanathan
Copy link

It's strange that pip is attempting to install azureml-rag 0.2.23 instead of 0.2.25, which is the latest version that's compliant with that version constraint.

I set up container with pyenv, ran pyenv install 3.11.6 followed by pyenv global 3.11.6, pip install promptflow promptflow-tools, and pip install promptflow-vectordb[azure]; everything ran without errors, including installing azureml-rag 0.2.25.

Is there anything else different about your environment that you think would be helpful in getting a repro going?

@diogoazevedo15
Copy link

Try to pip install like this:
pip install "promptflow-vectordb[azure]"

@tvanvalkenburg
Copy link
Author

Unfortunately it doesn't work. I tried in a fresh Python 3.11.6 container

@tvanvalkenburg
Copy link
Author

An update on this issue. I ran into a similar problem trying to install the az ml CLI. The problem with the CLI was that there is no arm64 wheel for azureml-dataprep-rslex. More details can be found at this issue: Azure/azure-cli#28600.

I got around the problem with the CLI by installing an older version, as is documented in the issue linked above. However, I am still not able to make it work when trying to install promptflow-vectordb.

@tvanvalkenburg
Copy link
Author

I was able to solve the issue by creating a conda environment with x_86 architecture. Within that environment I am able to install the required packages without issue. It appears that the problem is that the Azure ML Python SDK has gaps on Apple's ARM chips.

@orasik
Copy link

orasik commented Oct 23, 2024

I'm having the same issue.

I tried with multiple python versions [3.8, 3.9, 3.10, 3.11, and 3.12].

I have also tried in Apple M1 and Ubunute 22, same issue.

Tried with venv and conda, same issue.

pip install 'promptflow-vectordb[azure]'

Error

ERROR: Cannot install azureml-dataprep because these package versions have conflicting dependencies.

The conflict is caused by:
    azureml-dataprep 5.2.1 depends on azureml-dataprep-native<42.0.0 and >=41.0.0
    azureml-dataprep 5.2.0 depends on azureml-dataprep-native<42.0.0 and >=41.0.0
    azureml-dataprep 5.1.6 depends on azureml-dataprep-native<42.0.0 and >=41.0.0
    azureml-dataprep 5.1.5 depends on azureml-dataprep-native<42.0.0 and >=41.0.0
    azureml-dataprep 5.1.4 depends on azureml-dataprep-native<42.0.0 and >=41.0.0
    azureml-dataprep 5.1.3 depends on azureml-dataprep-native<42.0.0 and >=41.0.0
    azureml-dataprep 5.1.2 depends on azureml-dataprep-native<42.0.0 and >=41.0.0
    azureml-dataprep 5.1.1 depends on azureml-dataprep-native<42.0.0 and >=41.0.0
    azureml-dataprep 5.1.0 depends on azureml-dataprep-native<42.0.0 and >=41.0.0
    azureml-dataprep 5.0.0 depends on azureml-dataprep-native<42.0.0 and >=41.0.0
    azureml-dataprep 4.14.1 depends on dotnetcore2<4.0.0 and >=3.0.0
    azureml-dataprep 4.14.0 depends on dotnetcore2<4.0.0 and >=3.0.0
    azureml-dataprep 4.12.10 depends on dotnetcore2<4.0.0 and >=3.0.0
    azureml-dataprep 4.12.9 depends on dotnetcore2<4.0.0 and >=3.0.0
    azureml-dataprep 4.12.8 depends on dotnetcore2<4.0.0 and >=3.0.0
    azureml-dataprep 4.12.7 depends on dotnetcore2<4.0.0 and >=3.0.0
    azureml-dataprep 4.12.6 depends on dotnetcore2<4.0.0 and >=3.0.0
    azureml-dataprep 4.12.5 depends on dotnetcore2<4.0.0 and >=3.0.0
    azureml-dataprep 4.12.4 depends on dotnetcore2<4.0.0 and >=3.0.0
    azureml-dataprep 4.12.2 depends on dotnetcore2<4.0.0 and >=3.0.0
    azureml-dataprep 4.12.1 depends on dotnetcore2<4.0.0 and >=3.0.0
    azureml-dataprep 4.12.0 depends on dotnetcore2<4.0.0 and >=3.0.0
    azureml-dataprep 4.11.7 depends on dotnetcore2<4.0.0 and >=3.0.0
    azureml-dataprep 4.11.6 depends on dotnetcore2<4.0.0 and >=3.0.0
    azureml-dataprep 4.11.5 depends on dotnetcore2<4.0.0 and >=3.0.0
    azureml-dataprep 4.11.4 depends on dotnetcore2<4.0.0 and >=3.0.0
    azureml-dataprep 4.11.3 depends on dotnetcore2<4.0.0 and >=3.0.0
    azureml-dataprep 4.11.2 depends on dotnetcore2<4.0.0 and >=3.0.0
    azureml-dataprep 4.11.1 depends on dotnetcore2<4.0.0 and >=3.0.0

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants