Fix: force Python 3.10 in environment.yml to avoid PySide2 incompatibility #1023
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.
Previously, creating the conda environment from
environment.ymlwould install Python ≥ 3.11, butPySide2==5.15.2.1does not exist for Python ≥ 3.11.This caused installation failures with messages like:
which indicate that compatible wheels (e.g. NumPy 1.21.x and PySide2) only work up to Python 3.10.
To fix this, Python is now explicitly set to 3.10 in
environment.yml. This ensures compatibility and allows successful installation of Qiskit Metal.Changes:
environment.ymlenvironment.ymlREADME_developers.mdWhat are the issues this pull addresses (issue numbers / links)?
Fixes installation conflicts caused by incompatible Python version and pip dependencies in
environment.ymlthat prevented a successful environment setup.Did you add tests to cover your changes (yes/no)?
No - these are installation/documentation changes. Existing unit tests were run and pass with the new installation method.
Did you update the documentation accordingly (yes/no)?
Yes - Updated README_developers.md with clear step-by-step installation instructions including manual pip installation steps.
Did you read the CONTRIBUTING document (yes/no)?
Yes
Summary
The current environment.yml file causes version conflicts when installing pip dependencies (pyside2, gmsh, pyepr-quantum, pyaedt), making it difficult for developers to set up their environment successfully.
This PR resolves the issue by:
Details and comments
Problem: The environment.yml file included pip dependencies that caused conflicts during conda environment creation, particularly with packages like pyside2, gmsh, pyepr-quantum, and pyaedt.
Solution:
New Installation Process:
conda env create -n <env_name> environment.ymlconda activate <env_name>pip install pyside2==5.15.2.1pip install gmsh==4.11.1pip install pyepr-quantum==0.8.5.7pip install pyaedt==0.6.46python -m pip install --no-deps -e .This approach eliminates version conflicts and provides a reliable installation path for developers.