Skip to content

Conversation

@joanjcaceres
Copy link

@joanjcaceres joanjcaceres commented Aug 15, 2025

Previously, creating the conda environment from environment.yml would install Python ≥ 3.11, but PySide2==5.15.2.1 does not exist for Python ≥ 3.11.
This caused installation failures with messages like:

Ignored … Requires-Python >=3.7,<3.11

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:

  • Set Python version to 3.10 in environment.yml
  • Remove problematic pip dependencies from environment.yml
  • Add clear instructions for manual pip installation in README_developers.md
  • Simplify pip commands to use standard syntax

What are the issues this pull addresses (issue numbers / links)?
Fixes installation conflicts caused by incompatible Python version and pip dependencies in environment.yml that 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:

  1. Removing problematic pip dependencies from environment.yml
  2. Adding manual pip installation steps in README_developers.md
  3. Specifying Python 3.10 for better compatibility
  4. Providing clear documentation for both new and existing conda environments

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:

  • environment.yml: Removed pip dependencies and specified Python 3.10
  • README_developers.md: Added comprehensive manual installation instructions for both Option 1 (new environment) and Option 2 (existing environment)

New Installation Process:

  1. Create conda environment: conda env create -n <env_name> environment.yml
  2. Activate environment: conda activate <env_name>
  3. Install pip dependencies manually:
    • pip install pyside2==5.15.2.1
    • pip install gmsh==4.11.1
    • pip install pyepr-quantum==0.8.5.7
    • pip install pyaedt==0.6.46
  4. Install qiskit-metal: python -m pip install --no-deps -e .

This approach eliminates version conflicts and provides a reliable installation path for developers.

- Remove problematic pip dependencies from environment.yml
- Add clear instructions for manual pip installation in README_developers.md
- Simplify pip commands to use standard syntax
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@joanjcaceres joanjcaceres changed the title Fix environment installation issues Fix: force Python 3.10 in environment.yml to avoid PySide2 incompatibility Aug 15, 2025
@PositroniumJS
Copy link
Contributor

The fix to #1001 is not to enforce lower version but to update the code as in #1002

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants