[Python] SNOPT Installation for pyOptSparse and OpenMDAO

Discussão em 'Python' iniciado por Stack, Julho 29, 2025.

  1. Stack

    Stack Membro Participativo

    I'm trying to install SNOPT in the pyOpySparse driver for use in OpenMDAO.

    I have followed the instructions on the distributor's website for installation of the compiled libraries in Windows. I have set the license environment variable using

    set SNOPT_LICENSE "C:\Users\me\snopt7.lic"


    and placed the library files in the same location as my calling executable:

    .conda\Lib\site-packages\pyoptsparse-main\pyoptsparse\pySNOPT


    I have also downloaded the modified setup.py file from the pyOptSparse team and defined the location of my SNOPT library.

    I reinstalled the pyOptSparse driver using:

    conda install -c conda-forge pyoptsparse


    and the driver completed its install. However, I continue to get the error

    ImportError: Optimizer SNOPT is not available in this installation.


    when running the driver in OpenMDAO. I've seen other posts of people having troubles with this installation and was wondering if there's anything else I should be trying.

    Continue reading...

Compartilhe esta Página