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]: Can not use poetry to install pymilvus >= 2.4 #2131

Closed
1 task done
Raysilience opened this issue Jun 14, 2024 · 10 comments
Closed
1 task done

[Bug]: Can not use poetry to install pymilvus >= 2.4 #2131

Raysilience opened this issue Jun 14, 2024 · 10 comments
Assignees
Labels
kind/feature milvus-lite Issues related to milvus-lite
Milestone

Comments

@Raysilience
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

create a new environment using poetry, execute in terminal poetry add pymilvus=^2.4.3, it will raise the following error,
image

Expected Behavior

successfully install pymilvus with poetry

Steps/Code To Reproduce behavior

1. create a new environment using poetry
2. execute in terminal `poetry add pymilvus=^2.4.3`

Environment details

- Hardware/Softward conditions (OS, CPU, GPU, Memory):
- Method of installation (Docker, or from source):
- Milvus version (v0.3.1, or v0.4.0):
- Milvus configuration (Settings you made in `server_config.yaml`):

Anything else?

No response

@Raysilience Raysilience added the kind/bug Something isn't working label Jun 14, 2024
@yanliang567
Copy link
Contributor

/assign @junjiejiangjjj

/unassign

@sre-ci-robot
Copy link

@yanliang567: GitHub didn't allow me to assign the following users: junjiejiangjjj.

Note that only milvus-io members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @junjiejiangjjj

/unassign

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.

@zhuwenxing
Copy link
Contributor

@Raysilience
what is your os system? It works well in my Mac
image

pymilvus 2.3.4 includes a milvus-lite lib, and it is not supported in windows.

@Raysilience
Copy link
Contributor Author

Raysilience commented Jun 14, 2024

@zhuwenxing Mine is windows. Then how to exclude the milvus-lite while installing pymilvus.

@zhuwenxing
Copy link
Contributor

@zhuwenxing Mine is windows. Then how to exclude the milvus-lite while installing pymilvus.

@XuanYang-cn @junjiejiangjjj
any advice?

@Raysilience
Copy link
Contributor Author

@zhuwenxing @XuanYang-cn @junjiejiangjjj I check the pyproject.toml file. Maintainers list the milvus-lite inside the dependencies that leads to mandatory installation. This will definitely affect the developers operating on windows who are also using poetry to manage their projects. Would you consider moving the milvus-lite to optional dependencies such that windows developers still have access to pymilvus while other users are still able to install milvus-lite via poetry add pymilvus[milvus-lite] i.e.
[project.optional-dependencies]
milvus-lite = [
"milvus-lite>=2.4.0",
]
If so, I could create a pr to solve it.

@XuanYang-cn
Copy link
Contributor

@Raysilience we want "milvus-lite" to be the default dependency of pymilvus. So "No" for change it to optional dependencies for all platform.

However making it optional for Windows platform ONLY might be possible. Can you investigate and create a pr for it? I'll do some investigation myself too.

@XuanYang-cn XuanYang-cn added kind/feature milvus-lite Issues related to milvus-lite and removed kind/bug Something isn't working labels Jun 14, 2024
@XuanYang-cn XuanYang-cn self-assigned this Jun 14, 2024
@Raysilience
Copy link
Contributor Author

@XuanYang-cn Sure, I find out that poetry supports environment marker which might be suitable for the current case. I will give it a try, and if it works I will create a pr

Raysilience added a commit to Raysilience/pymilvus that referenced this issue Jun 16, 2024
sre-ci-robot pushed a commit that referenced this issue Jun 17, 2024
…#2134)

@XuanYang-cn 
Since the project is managed by setuptools, and according to the
[setuptools](https://setuptools.pypa.io/en/latest/userguide/dependency_management.html),
we can disable the automatic installation of milvus-lite on windows
platform by adding environment markers.
Following [PEP508](https://peps.python.org/pep-0508/), I pick the
environment marker "sys_platform != 'win32'" to prevent the
installation.
I build packages after the modification. Then test the .tar.gz and the
.whl files both on my windows laptop and a linux docker. The issue
mentioned in #2131 seems gone.
Due the lack of macOS machine, I could not perform testing on that
particular platform. Please check validity before merging.

Signed-off-by: rui zhang <[email protected]>
@XuanYang-cn
Copy link
Contributor

#2136 This PR will add checks for windows platform for every PR.

XuanYang-cn pushed a commit to XuanYang-cn/pymilvus that referenced this issue Jun 17, 2024
…-io#2131) (milvus-io#2134)

Since the project is managed by setuptools, and according to the
[setuptools](https://setuptools.pypa.io/en/latest/userguide/dependency_management.html),
we can disable the automatic installation of milvus-lite on windows
platform by adding environment markers.
Following [PEP508](https://peps.python.org/pep-0508/), I pick the
environment marker "sys_platform != 'win32'" to prevent the
installation.
I build packages after the modification. Then test the .tar.gz and the
.whl files both on my windows laptop and a linux docker. The issue
mentioned in milvus-io#2131 seems gone.
Due the lack of macOS machine, I could not perform testing on that
particular platform. Please check validity before merging.

Signed-off-by: rui zhang <[email protected]>
XuanYang-cn pushed a commit to XuanYang-cn/pymilvus that referenced this issue Jun 17, 2024
Since the project is managed by setuptools, and according to the
[setuptools](https://setuptools.pypa.io/en/latest/userguide/dependency_management.html),
we can disable the automatic installation of milvus-lite on windows
platform by adding environment markers.
Following [PEP508](https://peps.python.org/pep-0508/), I pick the
environment marker "sys_platform != 'win32'" to prevent the
installation.
I build packages after the modification. Then test the .tar.gz and the
.whl files both on my windows laptop and a linux docker. The issue
mentioned in milvus-io#2131 seems gone.
Due the lack of macOS machine, I could not perform testing on that
particular platform. Please check validity before merging.

enhance: Check PyMilvus on Windows platform

See also: milvus-io#2131, milvus-io#2134, milvus-io#2131

Co-Authored-by: rui zhang <[email protected]>
Signed-off-by: yangxuan <[email protected]>
sre-ci-robot pushed a commit that referenced this issue Jun 17, 2024
Since the project is managed by setuptools, and according to the

[setuptools](https://setuptools.pypa.io/en/latest/userguide/dependency_management.html),
we can disable the automatic installation of milvus-lite on windows
platform by adding environment markers.
Following [PEP508](https://peps.python.org/pep-0508/), I pick the
environment marker "sys_platform != 'win32'" to prevent the
installation.
I build packages after the modification. Then test the .tar.gz and the
.whl files both on my windows laptop and a linux docker. The issue
mentioned in #2131 seems gone.
Due the lack of macOS machine, I could not perform testing on that
particular platform. Please check validity before merging.

enhance: Check PyMilvus on Windows platform

---------

Signed-off-by: yangxuan <[email protected]>
Co-authored-by: Rui Zhang <[email protected]>
Co-authored-by: rui zhang <[email protected]>
@XuanYang-cn XuanYang-cn added this to the 2.4.4 milestone Jun 18, 2024
@XuanYang-cn
Copy link
Contributor

Should be ready in pymilvus==2.4.4
/assign @Raysilience
/unassign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature milvus-lite Issues related to milvus-lite
Projects
None yet
Development

No branches or pull requests

5 participants