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

ortools requiring protobuf>=4.21.5. #43

Open
christyzachsunny opened this issue Jan 15, 2023 · 1 comment
Open

ortools requiring protobuf>=4.21.5. #43

christyzachsunny opened this issue Jan 15, 2023 · 1 comment

Comments

@christyzachsunny
Copy link

christyzachsunny commented Jan 15, 2023

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:

  1. github code spaces
  2. 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

@flutesa
Copy link

flutesa commented Feb 8, 2023

I encountered the same issue while using

  1. MacOS Ventura 13.1
  2. Python 3.9

It was able to fix it after doing these steps:

  1. Replace in setup.py on line 10 version
    protobuf==3.19.4
    to
    protobuf==4.21.12

  2. Then while running the script by command
    maxfield-plan /Users/aguseva/PycharmProjects/ingress/maxfield/my_portals.txt --num_agents 2 --num_cpus 0 --output_csv
    I was having this problem:
    AttributeError: module '__main__' has no attribute '__spec__'
    To fix it I changed my command to
    python3 -m maxfield-plan /Users/aguseva/PycharmProjects/ingress/maxfield/my_portals.txt --num_agents 2 --num_cpus 2 --verbose --output_csv
    And in setup.py on line 12
    scripts=['bin/maxfield-plan'],
    to
    scripts=['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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants