Improve cross-platform development setup (solver path handling + dependency conflict)#11
Open
parthdagia05 wants to merge 1 commit intoOSeMOSYS:masterfrom
Open
Conversation
- Centralize solver path resolution in Config.py - Add PATH-based discovery for GLPK and CBC on macOS/Linux - Preserve existing Windows behavior - Add environment variable overrides (MUIO_GLPK_PATH, MUIO_CBC_PATH) - Fix urllib3 version conflict in requirements.txt (compatible with botocore) This enables running MUIO from source on macOS/Linux and resolves dependency installation failure in a clean virtual environment. Refs OSeMOSYS#10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #10
Improve Cross-Platform Development Setup (macOS/Linux)
Overview
This PR addresses two issues encountered while attempting to run MUIO from source on macOS (Apple Silicon):
requirements.txtprevented clean installation in a fresh virtual environment.Together, these issues block cross-platform development workflows. This PR resolves both while preserving existing Windows behavior.
1. Cross-Platform Solver Path Resolution
Problem
OsemosysClass.pypreviously defined solver directories using OS-specific hard-coded paths for non-Windows systems (e.g.,glpk-4.65/w64,Cbc-2.10-osx10.15-x86_64-gcc9/bin).These paths:
Solution
Solver path resolution has been centralized in
Config.pywith the following priority:MUIO_GLPK_PATHMUIO_CBC_PATH