Encountering DLL error in OR Tools pywrapcp

。_饼干妹妹 提交于 2020-11-25 03:43:44

问题


I used OR Tools V7.4 to build a routing model, it runs perfectly on my computer. However due to some situation I need ir for another team member to run the code.

Between me creating the model and giving my team member that responsability OR tools updated to V7.5, and we've faced the issue that he cant import one of the modules in the library. Trying to read de release notes I've not found anything that changes in the modules (names) we have literally the same of everything, but he cant run it.

My Python is 3.7 and 64-bit

This is the code:

from __future__ import print_function
import pandas as pd; 
import requests;
import os; 
from itertools import tee; 
import numpy as np
from pprint import pprint
from functools import partial
from six.moves import xrange
from ortools.constraint_solver import pywrapcp
from ortools.constraint_solver import routing_enums_pb2.

In my computer I find no mistake, while on his I find this mistake while importing pywrapcp

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-8731fb73bd10> in <module>
      8 from functools import partial
      9 from six.moves import xrange
---> 10 from ortools.constraint_solver import pywrapcp
     11 from ortools.constraint_solver import routing_enums_pb2

~\AppData\Local\Continuum\anaconda3\lib\site-packages\ortools\constraint_solver\pywrapcp.py in <module>
     11 # Import the low-level C/C++ module
     12 if __package__ or "." in __name__:
---> 13     from . import _pywrapcp
     14 else:
     15     import _pywrapcp

ImportError: DLL load failed: No se puede encontrar el módulo especificado.

I'm pretty desperate, because I think its a pretty stupid mistake and easy to solve.

Thanks!!!


回答1:


Please install visual studio 2019 redistributables




回答2:


You can download the Microsoft Visual C++ Redistributable for Visual Studio 2019 here: https://aka.ms/vs/16/release/VC_redist.x64.exe

src: https://visualstudio.microsoft.com/downloads/?q=Redistributable
note: you must select x64



来源:https://stackoverflow.com/questions/59992381/encountering-dll-error-in-or-tools-pywrapcp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!