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]: ModuleNotFoundError: No module named 'pymilvus' #26442

Closed
1 task done
LarryStewart2022 opened this issue Aug 17, 2023 · 12 comments
Closed
1 task done

[Bug]: ModuleNotFoundError: No module named 'pymilvus' #26442

LarryStewart2022 opened this issue Aug 17, 2023 · 12 comments
Assignees
Labels
kind/bug Issues or changes related a bug stale indicates no udpates for 30 days triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@LarryStewart2022
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Environment

- Milvus version:2.2.15
- Deployment mode(standalone):
- MQ type(rocksmq, pulsar or kafka):    
- SDK pymilvus 
- OS(vs code env): 
- CPU/Memory: 
- GPU: 
- Others:

Current Behavior

Just starting out. I created a new python environment and started to follow your docs:

COMPLETED THE FOLLOWING:
Requirements
Python 3.7 or later is required.
Google protobuf is installed. You can install it with the command pip3 install protobuf==3.20.0.
grpcio-tools is installed. You can install it with the command pip3 install grpcio-tools.

Clicked on what's next and ran this
from pymilvus import connections

And it get this error
Traceback (most recent call last):
File "c:\Milvustest\app.py", line 1, in
from pymilvus import connections
ModuleNotFoundError: No module named 'pymilvus'

Expected Behavior

No response

Steps To Reproduce

No response

Milvus Log

No response

Anything else?

No response

@LarryStewart2022 LarryStewart2022 added kind/bug Issues or changes related a bug needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Aug 17, 2023
@xiaofan-luan
Copy link
Collaborator

@XuanYang-cn
@longjiquan
any idea about the pymilvus install?

@yanliang567
Copy link
Contributor

I guess there are some conflict dependence in the python env. could you please retry with some virtual python env?
/assign @LarryStewart2022

@yanliang567 yanliang567 added triage/needs-information Indicates an issue needs more information in order to work on it. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Aug 19, 2023
@yanliang567 yanliang567 changed the title [Bug]: [Bug]: ModuleNotFoundError: No module named 'pymilvus' Aug 19, 2023
@yanliang567 yanliang567 removed their assignment Aug 21, 2023
@dgarnitz
Copy link

I am also running into this issue

@longjiquan
Copy link
Contributor

longjiquan commented Aug 22, 2023

Did you already install the pymilvus? I noticed that you only installed the protobuf and grpcio-tools. @LarryStewart2022
Btw, can you tell us which documentation you refered to use milvus, maybe it's not up-to-date now and we'll update it if anything is changed.

@longjiquan
Copy link
Contributor

Did you already install the pymilvus? I noticed that you only installed the protobuf and grpcio-tools. @LarryStewart2022 Btw, can you tell us which documentation you refered to use milvus, maybe it's not up-to-date now and we'll update it if anything is changed.

@dgarnitz plz also take a look and we'll apreciate it very much.

@dgarnitz
Copy link

Yes, I had definitely installed pymilvus and it was included in my requirements.txt. For me the installation of pymilvus and running the code succeed locally on my mac with a warning about a conflict between dependencies that were not compatibke.

@longjiquan I was having the ModuleNotFound error when trying to install the requirements during a docker build. In this scenario it was not installing the pymilvus module at all into the container but also not throwing an error at build time. It just skipped it.

I solved this issue by removing the versioning in my requirements.txt file for grpcio and grpcio-tools from the requirements.txt to let pip resolve the conflict itself. Based on some older closed github issues I saw, it looks like Milvus users have run into this issue before and a new version comes out that fixes it.

@LarryStewart2022
Copy link
Author

LarryStewart2022 commented Aug 24, 2023

What a nightmare. so, I decide to just start from scratch. I removed all of milvus from my Ubuntu Docker server and reinstalled it. I am using (https://milvus.io/docs/) On this Page (https://milvus.io/docs/install_standalone-docker.md) i installed and started Milvus without any issues. In vscode on my windows machine i created and environment and I'm running Python 3.11.4.
(python3 -m pip install pymilvus==2.3.0) I also ran (python3 -c "from pymilvus import Collection") no issues. I downloaded hello_milvus.py and changed the connection to my server (connections.connect("default", host="192.168.0.48", port="19530")) AND then this RPC error: [__internal_register], <MilvusException: (code=1, message=this version of sdk is incompatible with server, please downgrade your sdk or upgrade your server)>, <Time:{'RPC start': '2023-08-24 10:38:03.485577', 'RPC error': '2023-08-24 10:38:03.491746'}> I still have yet to make a connectoin to this server. Why so many issues?

@yanliang567
Copy link
Contributor

/assign @XuanYang-cn
please help

@longjiquan
Copy link
Contributor

@LarryStewart2022 sorry, but as the message mentioned, maybe you should try to upgrade the version of your server.

@stale
Copy link

stale bot commented Sep 27, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Rotten issues close after 30d of inactivity. Reopen the issue with /reopen.

@louis-sanna-eki
Copy link

/reopen

@sre-ci-robot
Copy link
Contributor

@louis-sanna-eki: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Issues or changes related a bug stale indicates no udpates for 30 days triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

No branches or pull requests

8 participants