Skip to main content

Setup.py script is not working, Windows 10, Python 3.7.4, Gurobi 8.1.1

Answered

Comments

3 comments

  • Matt Hall
    Gurobi-versary
    First Comment
    First Question

    I have also tried running the setup script,

    C:\gurobi811\win64\bin\pysetup

    by passing in my python path, but this didn't resolve my issue either.

    Python installation directory (hit ENTER to use c:\Python27): C:\Users\12096\AppData\Local\Programs\Python\Python37-32

    running install
    running build
    running build_py
    creating build
    creating build\lib
    creating build\lib\gurobipy
    copying python37\lib\gurobipy\__init__.py -> build\lib\gurobipy
    copying python37\lib\gurobipy\gurobipy.pyd -> build\lib\gurobipy
    running install_lib
    running install_egg_info
    Removing C:\Users\12096\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\gurobipy-8.1.1-py3.7.egg-info
    Writing C:\Users\12096\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\gurobipy-8.1.1-py3.7.egg-info
    removing C:\gurobi811\win64\build

    [Hit ENTER to exit]

    Again, when I run my python shell, I fail to import gurobipy.

    Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 19:29:22) [MSC v.1916 32 bit (Intel)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from gurobipy import *
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "C:\Users\12096\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurobipy\__init__.py", line 1, in <module>
    from .gurobipy import *
    ImportError: DLL load failed: %1 is not a valid Win32 application.
    0
  • Gwyneth Butera
    Gurobi Staff Gurobi Staff

    Hi Matt - It looks like your default Python is a 32-bit version:

    C:\Users\12096\AppData\Local\Programs\Python\Python37-32\lib

    Gurobi 8.x works only with 64-bit Python installations. Can you try using a different Python?

    Thanks.

    0
  • Matt Hall
    Gurobi-versary
    First Comment
    First Question

    Thanks Gwyneth!

    0

Please sign in to leave a comment.