Invalid ELF header

2,346 views
Skip to first unread message

Amit Kumar

unread,
Jun 18, 2016, 10:53:20 AM6/18/16
to or-tools-discuss
I installed the new version ortools-3.3632. When i run the test example golomb8.py, i am getting this error

ImportError: /usr/local/lib/python2.7/dist-packages/ortools-3.3632-py2.7-linux-x86_64.egg/ortools/constraint_solver/_pywrapcp.so: invalid ELF header

Also, while importing routing_enums_pb2, i am getting this no protobuf module error which i have installed yesterday.

File "/usr/local/lib/python2.7/dist-packages/ortools-3.3632-py2.7-linux-x86_64.egg/ortools/constraint_solver/routing_enums_pb2.py", line 6, in <module>
    from google.protobuf import descriptor as _descriptor
ImportError: No module named protobuf 

Any workaround this error? 

Amit Kumar

unread,
Jun 18, 2016, 11:02:00 AM6/18/16
to or-tools-discuss
Also i wasn't getting the first error yesterday with older version. The second one i didn't try earlier but protobuf is definitely installed.
Message has been deleted

Amit Kumar

unread,
Jun 18, 2016, 6:33:47 PM6/18/16
to or-tools-discuss
Complete error text
>>> from ortools.constraint_solver import pywrapcp
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/ortools-3.3632-py2.7-linux-x86_64.egg/ortools/constraint_solver/pywrapcp.py", line 28, in <module>
    _pywrapcp = swig_import_helper()
  File "/usr/local/lib/python2.7/dist-packages/ortools-3.3632-py2.7-linux-x86_64.egg/ortools/constraint_solver/pywrapcp.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrapcp', fp, pathname, description)

ImportError: /usr/local/lib/python2.7/dist-packages/ortools-3.3632-py2.7-linux-x86_64.egg/ortools/constraint_solver/_pywrapcp.so: invalid ELF header

Tim Niblett

unread,
Jun 20, 2016, 1:58:33 AM6/20/16
to or-tools-discuss
I am also getting this error:

>>> from ortools.linear_solver import pywraplp

 

Traceback (most recent call last):

 
File "<stdin>", line 1, in <module>


 
File "/usr/local/lib/python2.7/dist-packages/ortools-3.3632-py2.7-linux-x86_64.egg/ortools/linear_solver/pywraplp.py", line 28, in <module>

    _pywraplp
= swig_import_helper()

 
File "/usr/local/lib/python2.7/dist-packages/ortools-3.3632-py2.7-linux-x86_64.egg/ortools/linear_solver/pywraplp.py", line 24, in swig_import_helper

    _mod
= imp.load_module('_pywraplp', fp, pathname, description)

 
ImportError: /usr/local/lib/python2.7/dist-packages/ortools-3.3632-py2.7-linux-x86_64.egg/ortools/linear_solver/_pywraplp.so: invalid ELF header

Laurent Perron

unread,
Jun 20, 2016, 3:45:29 AM6/20/16
to or-tools-discuss
Hi, 

Which platform are you on? unbuntu 14.04, 16.04?

Thanks

Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00


--
You received this message because you are subscribed to the Google Groups "or-tools-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to or-tools-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Amit Kumar

unread,
Jun 20, 2016, 4:27:48 AM6/20/16
to or-tools-discuss
14.04

For now i have shifted to 3.3629 version which is working fine. My protobuf error was different. I added protobuf built to the python path and it worked but invalid ELF header error was still there.

Laurent Perron

unread,
Jun 20, 2016, 4:46:28 AM6/20/16
to or-tools-discuss

I think we built the release with 16.04.
Too bad it is not compatible.

Does anyone knows how if it is possible to have per linux distribution pyoi modules?

Driss Lahlou

unread,
Jun 20, 2016, 6:49:02 AM6/20/16
to or-tools-discuss
since the version 3.3632 had some errors, we will get back to the version 3.3629 that seems stable, and wait until we can find better solutions to install ortools from pypi

Thank you for the report

Driss Lahlou

unread,
Jun 20, 2016, 6:55:54 AM6/20/16
to or-tools-discuss
Hello Amit,
A new archive have been uploaded. Can you please give it a try? thank you

Amit Kumar

unread,
Jun 20, 2016, 7:35:15 AM6/20/16
to or-tools-discuss
I think you have removed 3.3632 version. Now by default 3.3629 is installing and its working fine.

Thank you

Emad Farag

unread,
Jul 6, 2016, 6:42:51 PM7/6/16
to or-tools-discuss
Hi all,
I still get the same error when I try to install the py3-ortools package using pip. Could you push the same fix you did for python2 to the python3 version of the package as well?
Thanks!

Driss Lahlou

unread,
Jul 7, 2016, 4:51:12 AM7/7/16
to or-tools...@googlegroups.com
Hello Emad,
Thank you for your message. I fixed the problem for python3, can you please try it again?
Regards

--

Emad Farag

unread,
Jul 7, 2016, 3:50:37 PM7/7/16
to or-tools...@googlegroups.com
Hi Driss,

It seems that the py3-ortools package is completely removed from PyPi now. Opening the following link gives me a 404 error: https://pypi.python.org/pypi/py3-ortools 

You received this message because you are subscribed to a topic in the Google Groups "or-tools-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/or-tools-discuss/ZTAP6AOPxBY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to or-tools-discu...@googlegroups.com.

Driss Lahlou

unread,
Jul 8, 2016, 6:10:09 AM7/8/16
to or-tools...@googlegroups.com
Can you please try it again now?

Emad Farag

unread,
Jul 8, 2016, 1:41:47 PM7/8/16
to or-tools-discuss
Hi Driss,

The pypi webpage doesn't return 404 anymore, but I still can't install the package. I get the following error on both Mac OS X (python3.5) and on Ubuntu 14.04 (python 3.4)

>>> pip install py3-ortools
Collecting py3-ortools
  Could not find a version that satisfies the requirement py3-ortools (from versions: )
No matching distribution found for py3-ortools

Driss Lahlou

unread,
Jul 11, 2016, 5:55:06 AM7/11/16
to or-tools...@googlegroups.com
Yes, because ortools doesn't support pip due to some incompatibilities with native libraries on ubuntu, so we recommend using easy_install instead : easy_install py3-ortools

In case you have many versions of python on your machine, please make sure you're using easy_install installed by python3.5. You can check this by running easy_install --version, it should display the related version of python.

Hope this helps

driss

Emad Farag

unread,
Jul 11, 2016, 4:18:34 PM7/11/16
to or-tools...@googlegroups.com
Great, so that made it work on Ubuntu!

On another note, I was able to install py3-ortools on Mac using pip last week, but now I can no longer install it using pip as it complains "Could not find a version that satisfies the requirement py3-ortools (from versions: )" Do you know what's causing this? It seems that the package is compatible with pip on Mac since I was able to use it last week.

Driss Lahlou

unread,
Jul 12, 2016, 7:45:17 AM7/12/16
to or-tools...@googlegroups.com
You could install py3-ortools using pip because we were testing a package with wheel, but it showed some incompatibilities with linux, so we can only use easy_install for the moment, but we are trying to make ortools and py3-ortools available for pip at least on mac and windows. We will probably do this in the next release.
Reply all
Reply to author
Forward
0 new messages