Fernando Delgado
Fernando Delgado

Reputation: 53

Encountering DLL error in OR Tools pywrapcp

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!!!

Upvotes: 1

Views: 3641

Answers (2)

Mizux
Mizux

Reputation: 9301

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

Upvotes: 3

Laurent Perron
Laurent Perron

Reputation: 11034

Please install visual studio 2019 redistributables

Upvotes: 2

Related Questions