ortools requiring protobuf>=4.21.5.
while executing: maxfield-plan portals16.txt --num_agents 1 --num_field_iteration 100000 --num_cpus 0 --max_route_runtime 3600 --verbose --output_csv ortools requiring protobuf>=4.21.5 while using:
- github code spaces
- WSL2 ubuntu
pkg_resources.ContextualVersionConflict: (protobuf 3.19.4 (/usr/local/python/3.10.4/lib/python3.10/site-packages/protobuf-3.19.4-py3.10.egg), Requirement.parse('protobuf>=4.21.5'), {'ortools'}) Teminal log.txt
Any workaround would be helpful
I encountered the same issue while using
- MacOS Ventura 13.1
- Python 3.9
It was able to fix it after doing these steps:
-
Replace in setup.py on line 10 version
protobuf==3.19.4toprotobuf==4.21.12 -
Then while running the script by command
maxfield-plan /Users/aguseva/PycharmProjects/ingress/maxfield/my_portals.txt --num_agents 2 --num_cpus 0 --output_csvI was having this problem:AttributeError: module '__main__' has no attribute '__spec__'To fix it I changed my command topython3 -m maxfield-plan /Users/aguseva/PycharmProjects/ingress/maxfield/my_portals.txt --num_agents 2 --num_cpus 2 --verbose --output_csvAnd in setup.py on line 12scripts=['bin/maxfield-plan'],toscripts=['bin/maxfield-plan.py'],And in your file system add '.py' to this file name accordingly. Finally, it was fixed and worked out for me!
🎉 Wish you success and hope it'll be working fine for you too! Have joyful game)