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

run pip install nvflare==2.1.2 brings wrong protobuf version #736

Closed
yiheng-wang-nv opened this issue Jul 28, 2022 · 3 comments · Fixed by #738
Closed

run pip install nvflare==2.1.2 brings wrong protobuf version #736

yiheng-wang-nv opened this issue Jul 28, 2022 · 3 comments · Fixed by #738
Assignees
Labels
bug Something isn't working

Comments

@yiheng-wang-nv
Copy link
Collaborator

When using pip install nvflare==2.1.2, protobuf 4.21.4 is installed:

Collecting protobuf<5.0.0dev,>=3.15.0
  Downloading protobuf-4.21.4-cp37-abi3-manylinux2014_x86_64.whl (408 kB)

and when starting the server (./poc/server/startup/start.sh), I got the following error:

TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

downgrade into 3.20.1 solves the issue:

 pip install protobuf==3.20.1

In the requirements-min.txt of v2.1.2, it specifies to use protobuf==3.20.1 (https://github.com/NVIDIA/NVFlare/blob/2.1.2/requirements-min.txt#L7), but why this requirement does not work when running the pip install command? Is there anything wrong here?

@yiheng-wang-nv
Copy link
Collaborator Author

Update: it seems we can do sth like in: ultralytics/yolov5#8012
set protobuf<=3.20.1

@YuanTingHsieh YuanTingHsieh added the bug Something isn't working label Jul 28, 2022
@YuanTingHsieh
Copy link
Collaborator

Hi @yiheng-wang-nv thanks for the report!

According to @IsaacYangSLA, the pip install is going to use "setup.py".
Which in our 2.1.2 tag we did not specify the version inside it: https://github.com/NVIDIA/NVFlare/blob/2.1.2/setup.py

I will fix this in the dev branch.

@YuanTingHsieh
Copy link
Collaborator

@yiheng-wang-nv , @IsaacYangSLA has created a new tag NVFlare 2.1.3.
It is available: https://pypi.org/project/nvflare/

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

Successfully merging a pull request may close this issue.

3 participants