Failed to "import gurobipy" even after running setup.py or pysetup.bat

Comments

4 comments

  • Matthias Miltenberger

    How did you install Gurobi? Could you please share the commands you used and the resulting output?

    Cheers,
    Matthias

    0
    Comment actions Permalink
  • A BC

    I first run the .msi file, keeping every setting as default. Then, from the installation path, I ran python setup.py install, which returns:

    running install
    running build
    running build_py
    creating build
    creating build\lib
    creating build\lib\gurobipy
    copying python38\lib\gurobipy\__init__.py -> build\lib\gurobipy
    copying python38\lib\gurobipy\gurobipy.pyd -> build\lib\gurobipy
    running install_lib
    byte-compiling C:\Users\1\AppData\Local\Programs\Python\Python38\Lib\site-packages\gurobipy\__init__.py to __init__.cpython-38.pyc
    running install_egg_info
    Removing C:\Users\1\AppData\Local\Programs\Python\Python38\Lib\site-packages\gurobipy-9.0.1-py3.8.egg-info
    Writing C:\Users\1\AppData\Local\Programs\Python\Python38\Lib\site-packages\gurobipy-9.0.1-py3.8.egg-info
    removing C:\gurobi901\win64\build

     

    0
    Comment actions Permalink
  • Matthias Miltenberger

    Could you please try using the Anaconda Python 3.8 distribution? This works fine with Gurobi. Apparently, there is some issue with the "official" Python 3.8 and Gurobi.

    Cheers,
    Matthias

    0
    Comment actions Permalink
  • A BC

    I downgraded python to 3.7.5 and it works too. Thanks.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk