pyinstaller created .exe can't find module ortools.constraint_solver.routing_parameters_pb2 #3579
Replies: 1 comment 2 replies
-
src: https://pyinstaller.org/en/stable/usage.html?highlight=hidden#cmdoption-hidden-import |
Beta Was this translation helpful? Give feedback.
-
What version of OR-Tools and what language are you using?
Version: 9.4.1874
Language: Python 3.10
Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi)
Routing
What operating system (Linux, Windows, ...) and version?
Windows Server 2016 Datacenter
What did you do?
Steps to reproduce the behavior:
Script works fine under python.
Package created using
pyinstaller --hidden-import ortools.constraint_solver.routing_parameters_pb2 --hidden-import pkg_resources.py2_warn --onefile .\vrptime.py
(Hidden imports suggested in #802 )
What did you expect to see
Program to run as per script
What did you see instead?
Traceback (most recent call last):
File "vrptime.py", line 211, in
main(driverId)
File "vrptime.py", line 193, in main
search_parameters = pywrapcp.DefaultRoutingSearchParameters()
File "ortools\constraint_solver\pywrapcp.py", line 4680, in DefaultRoutingSearchParameters
ModuleNotFoundError: No module named 'ortools.constraint_solver.routing_parameters_pb2'
[6736] Failed to execute script 'vrptime' due to unhandled exception!
Make sure you include information that can help us debug (full error message, model Proto).
Anything else we should know about your project / environment
VC_redist.x64.exe installed
Beta Was this translation helpful? Give feedback.
All reactions