macOS: pip install flwr[simulation] uninstalls flwr 1.8.0 and installs 0.16.0
philips opened this issue · 6 comments
Describe the bug
On macOS I have a virtualenv where I am trying to do the getting started tutorial. https://flower.ai/docs/framework/tutorial-series-get-started-with-flower-pytorch.html
Steps/Code to Reproduce
Baseline installation of my environment:
(.venv) $ uname -v
Darwin Kernel Version 23.4.0: Fri Mar 15 00:19:22 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T8112
(.venv) $ python --version
Python 3.12.2
(.venv) $ pip install -U flwr["simulation"]
Attempting uninstall: protobuf
Found existing installation: protobuf 4.25.3
Uninstalling protobuf-4.25.3:
Successfully uninstalled protobuf-4.25.3
Attempting uninstall: flwr
Found existing installation: flwr 1.8.0
Uninstalling flwr-1.8.0:
Successfully uninstalled flwr-1.8.0
Successfully installed flwr-0.16.0 protobuf-3.20.3
(.venv) $ pip install -U flwr
Attempting uninstall: flwr
Found existing installation: flwr 0.16.0
Uninstalling flwr-0.16.0:
Successfully uninstalled flwr-0.16.0
Successfully installed flwr-1.8.0 protobuf-4.25.3
Expected Results
Running pip install -U flwr["simulation"]
does not uninstall 1.8.0 of flwr for 0.16.0
Actual Results
Running pip install -U flwr["simulation"]
does uninstall 1.8.0 of flwr and installs 0.16.0
I fixed this by forcing the use of python 3.10 instead of 3.12. Y'all might consider removing old versions of flwr without the strict python version requirement to avoid this confusing situation for users with up to date python runtimes.
$ python3.10 -m venv .venv
$ source .venv/bin/activate
The docs recommend "Python 3.10 or higher" so this is super confusing: https://github.com/adap/flower/blob/master/doc/source/contributor-how-to-set-up-a-virtual-env.rst
@philips The issue seems to be that ray
(a simulation dependency) currently does not support Python 3.12
, so the resolver installs the latest version of flwr
that used a version of ray
that had no upper bound on the version of Python
. Thanks a lot for the heads up, we will modify the docs to reflect this!
Thank you!
Thanks!!