{"library":"pyscipopt","title":"Python Interface and Modeling Environment for SCIP","description":"PySCIPOpt is a Python interface and modeling environment for the SCIP Optimization Suite, a powerful mixed-integer programming (MIP) and mixed-integer nonlinear programming (MINLP) solver. It allows users to formulate and solve optimization problems using Python syntax. The library is actively maintained with frequent releases, often coinciding with new major versions of the underlying SCIP solver.","language":"python","status":"active","last_verified":"Mon May 18","install":{"commands":["pip install pyscipopt"],"cli":null},"imports":["from pyscipopt import Model"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from pyscipopt import Model, SCIP_STATUS\n\n# Create a SCIP model\nmodel = Model(\"Simple_LP\")\n\n# Add variables\nx = model.addVar(\"x\", vtype=\"CONTINUOUS\", lb=0.0)\ny = model.addVar(\"y\", vtype=\"CONTINUOUS\", lb=0.0)\n\n# Set the objective function: Maximize x + 2y\nmodel.setObjective(x + 2*y, \"maximize\")\n\n# Add constraints\nmodel.addCons(x + y <= 10, \"c1\")\nmodel.addCons(2*x + y <= 15, \"c2\")\n\n# Optimize the model\nmodel.optimize()\n\n# Check the solution status and print results\nif model.getStatus() == SCIP_STATUS.OPTIMAL:\n    print(f\"Optimal solution found.\")\n    print(f\"Objective value: {model.getObjVal()}\")\n    print(f\"x: {model.getVal(x)}\")\n    print(f\"y: {model.getVal(y)}\")\nelse:\n    print(f\"Problem could not be solved to optimality. Status: {model.getStatus()}\")\n\n# Clean up the model (important for repeated modifications/solves)\nmodel.freeProb()","lang":"python","description":"This quickstart demonstrates how to create a simple linear programming model, add variables, define an objective function, add constraints, optimize the model, and retrieve the solution. It also shows how to check the optimization status and explicitly free problem data.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-18","installed_version":"6.2.1","pypi_latest":"6.2.1","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":50,"avg_install_s":4.1,"avg_import_s":0.29,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"pyscipopt","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"pyscipopt","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":4.2,"import_time_s":0.21,"mem_mb":8.4,"disk_size":"138M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"pyscipopt","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"pyscipopt","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":4,"import_time_s":0.35,"mem_mb":8.7,"disk_size":"147M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"pyscipopt","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"pyscipopt","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":3.7,"import_time_s":0.31,"mem_mb":8.5,"disk_size":"135M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"pyscipopt","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"pyscipopt","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":3.9,"import_time_s":0.32,"mem_mb":9,"disk_size":"134M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"pyscipopt","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"pyscipopt","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":4.7,"import_time_s":0.25,"mem_mb":8.2,"disk_size":"148M"}]}}