fix: add pip to environment.yml to prevent system pip fallback#632
Merged
juanitorduz merged 1 commit intomainfrom Jan 7, 2026
Merged
fix: add pip to environment.yml to prevent system pip fallback#632juanitorduz merged 1 commit intomainfrom
juanitorduz merged 1 commit intomainfrom
Conversation
- Added pip as explicit dependency to prevent using system pip - Bumped minimum Python version from 3.11 to 3.12 Without pip in environment.yml, conda environments fall back to system pip (e.g., Homebrew's pip on macOS) which may be linked to a different Python version. This causes confusing errors like 'Package requires a different Python: 3.10.16 not in >=3.11' even when the conda environment has Python 3.12+. Adding pip ensures the correct pip is used within the conda environment.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #632 +/- ##
==========================================
+ Coverage 93.48% 93.74% +0.26%
==========================================
Files 39 41 +2
Lines 6031 6827 +796
Branches 389 458 +69
==========================================
+ Hits 5638 6400 +762
- Misses 255 267 +12
- Partials 138 160 +22 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
juanitorduz
approved these changes
Jan 7, 2026
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.
Summary
This PR fixes an issue where
conda env create -f environment.ymlwould create an environment that uses the wrongpipexecutable, causing confusing installation errors.Problem
When setting up the development environment, users encountered this error:
This occurred even when the conda environment had Python 3.12+ installed. The root cause:
environment.ymldid not includepipas a dependency/opt/homebrew/bin/pipon macOS)Solution
pipas an explicit dependency - This ensures pip is installed within the conda environment and the correct pip is usedTesting
After this fix:
which pipcorrectly shows/path/to/mambaforge/envs/CausalPy/bin/pippip install -e ".[test]"works without version mismatch errorsmake testruns successfully📚 Documentation preview 📚: https://causalpy--632.org.readthedocs.build/en/632/