apache / airavata-mft

Apache Airavata Managed File Transfer Services
https://airavata.apache.org
Apache License 2.0
32 stars 39 forks source link

Unable to install airavata-mft with Python3.11 #104

Closed nandarshan closed 1 year ago

nandarshan commented 1 year ago

Describe the bug Unable to install airavata-mft with Python3.11. I get the following errors: -> ERROR: Could not build wheels for grpcio, grpcio-tools, which is required to install pyproject.toml-based projects

To Reproduce To reproduce,
1) Install python3.11
2) If you have already installed airavata-mft, create a virtual environment with python3.11.
3) To create venv: python3.11 -m venv \<path>
4) To activate venv: source \<path>/bin/activate
5) python3.11 -m pip install airavata-mft-cli 6) Error I got is shown in the following screenshot.

Screenshot 2023-06-20 at 10 51 33 AM

Expected behavior To install successfully

Additional context 1 System Configuration:
1) Processor: 2.4 GHz 8-Core Intel Core i9 2) Operating System: macOS Ventura Version 13.4 3) Python version: 3.11.4

Additional context 2 Even though this issue is for M1/M2 Macs, I found this issue similar to the above error. This issue had a solution which is to install a specific version of grpcio and grpcio-tools. But installing those gave an error in python3.11
On entering the following to the testvenv activated above:
python3.11 -m pip install grpcio==1.47.0rc1
I got the following error

Screenshot 2023-06-20 at 11 17 08 AM

I tried the second command in the solution of this issue. On entering the following to the testenv activated above:
python3 -m pip install grpcio-tools==1.47.0rc1
I got the following error

Screenshot 2023-06-20 at 11 25 07 AM



Additional context 3 I was able to successfully install the airavata-mft after downgrading to python3.10. Since I was not able to install airavata-mft with python3.11, I am posting this issue.

EDIT: Added backslashes before \< and > in the markdown so that \<path> is visible in step 3 and step 4 of the "To Reproduce" section.

machristie commented 1 year ago

I ran into this with the airavata-django-portal-sdk, I found the following versions to work well (this was 6 months ago):

grpcio-tools==1.48.2 ; python_version < "3.7"
grpcio-tools==1.51.1 ; python_version >= "3.7"
grpcio==1.48.2 ; python_version < "3.7"
grpcio==1.51.1 ; python_version >= "3.7"

https://github.com/apache/airavata-django-portal-sdk/blob/master/requirements.txt#L8-L11

Also, with the SDK we needed to support Python 3.6, but I wouldn't recommend that for MFT.

nandarshan commented 1 year ago

Description Thank you for the reply. I installed the grpcio 1.51.1 and grpcio-tools 1.51.1 as I'm experimenting with python3.11 (>= "3.7"). The installations of grpcio and grpcio-tools were successful. But the installation of airavata-mft-cli failed.

To reproduce I ran the following commands to install them with the required versions. The commands used to install grpcio and grpcio-tools are:
1) python3.11 -m pip install grpcio==1.51.1 2) python3.11 -m pip install grpcio-tools==1.51.1

The same can be seen in the following screenshot.

Screenshot 2023-06-21 at 10 52 09 AM



After installing grpcio and grpcio-tools, I ran the following command to install the airavata-mft-cli -> python3.11 -m pip install airavata-mft-cli

But the installation failed with the following error. -> ERROR: Could not build wheels for grpcio, grpcio-tools, which is required to install pyproject.toml-based projects
This is the same error I got before too.

This error can be seen in the following screenshot

Screenshot 2023-06-21 at 11 14 48 AM


Expected Behavior To install successfully

Additional Context 1 The System configuration is the same as the one mentioned in my previous comment on this issue.
And, all the commands are executed in a virtual environment which was created using the steps mentioned in my previous comment on this issue

Additional Context 2 Before Installing grpcio and grpcio-tools I ran the following to uninstall all the previously installed versions of grpcio and grpcio-tools 1) python3.11 -m pip uninstall grpcio 2) python3.11 -m pip uninstall grpcio-tools

machristie commented 1 year ago

I think the problem is here: https://github.com/apache/airavata-mft/blob/master/python-sdk/pyproject.toml#L20. The pyproject.toml requires specific versions of grpcio and grpcio-tools, so even though you've already upgraded them, it reverts to these older versions.

I think you could try just removing grpcio and grpcio-tools from the requires list in pyproject.toml.

nandarshan commented 1 year ago

Thank you so much. It worked. I removed grpcio and grpcio-tools from pyproject.toml in the python-sdk folder and built the sdk locally. It got installed successfully.

DImuthuUpe commented 1 year ago

Closing this as the issue was resolved

ZhenmeiOng commented 8 months ago

I think the problem is here: https://github.com/apache/airavata-mft/blob/master/python-sdk/pyproject.toml#L20. The pyproject.toml requires specific versions of grpcio and grpcio-tools, so even though you've already upgraded them, it reverts to these older versions.

I think you could try just removing grpcio and grpcio-tools from the requires list in pyproject.toml.

how do you do that? I can't find the file on my local files.