Skip to content

Tox environment uses git+https://github.com/Qiskit/qiskit.git, preventing local testing with qiskit>=1.0,<2.0 requirement #912

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
SaashaJoshi opened this issue Apr 30, 2025 · 0 comments
Assignees
Labels
dependencies 🔗 Involves external dependency libraries type: bug 🐞 Something isn't working

Comments

@SaashaJoshi
Copy link

Environment

  • Qiskit Machine Learning version: 0.9.0
  • Python version: 3.10
  • Operating system: MacOS

What is happening?

I am trying to run unit tests in development mode using tox on my local machine but the tox.ini file installs Qiskit from source using,

deps = git+https://github.com/Qiskit/qiskit.git

This is forcing the installation of the latest version of qiskit=2.0, which creates a conflict with the requirements.txt requiring qiskit>=1.0,<2.0. This is preventing me from performing local testing on my machine.

How can we reproduce the issue?

On the terminal,

pip install -e .
tox

I get the following error,

py39: exit 1 (11.08 seconds) /Users/saashajoshi/Documents/gitRepos/qiskit-machine-learning> pip install -c constraints.txt -U sparse torch git+https://github.com/Qiskit/qiskit-aer.git git+https://github.com/Qiskit/qiskit.git -r /Users/saashajoshi/Documents/gitRepos/qiskit-machine-learning/requirements.txt -r /Users/saashajoshi/Documents/gitRepos/qiskit-machine-learning/requirements-dev.txt pid=4409
py39: FAIL ✖ in 11.22 seconds
py310: install_deps> pip install -c constraints.txt -U sparse torch git+https://github.com/Qiskit/qiskit-aer.git git+https://github.com/Qiskit/qiskit.git -r /Users/saashajoshi/Documents/gitRepos/qiskit-machine-learning/requirements.txt -r /Users/saashajoshi/Documents/gitRepos/qiskit-machine-learning/requirements-dev.txt
Collecting git+https://github.com/Qiskit/qiskit-aer.git
  Cloning https://github.com/Qiskit/qiskit-aer.git to /private/var/folders/3j/3p_dzlvs1nsdfryf9hm7gjnr0000gn/T/pip-req-build-j27220ub
  Resolved https://github.com/Qiskit/qiskit-aer.git to commit 21eae0368929e818978a74d77424644ca9e3f6d3
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting git+https://github.com/Qiskit/qiskit.git
  Cloning https://github.com/Qiskit/qiskit.git to /private/var/folders/3j/3p_dzlvs1nsdfryf9hm7gjnr0000gn/T/pip-req-build-2xat5b_j
  Resolved https://github.com/Qiskit/qiskit.git to commit 42c4fe39651143b7b49ca62981269979b03c726f
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting sparse
  Using cached sparse-0.16.0-py2.py3-none-any.whl.metadata (5.3 kB)
Collecting torch
  Using cached torch-2.7.0-cp310-none-macosx_11_0_arm64.whl.metadata (29 kB)

The conflict is caused by:
    The user requested qiskit 2.1.0 (from git+https://github.com/Qiskit/qiskit.git)
    The user requested qiskit<2.0 and >=1.0

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip to attempt to solve the dependency conflict

What should happen?

The tox command should run without any error.

Any suggestions?

Override Qiskit version in the tox.ini file.

@edoaltamura edoaltamura added type: bug 🐞 Something isn't working dependencies 🔗 Involves external dependency libraries labels May 10, 2025
@edoaltamura edoaltamura self-assigned this May 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies 🔗 Involves external dependency libraries type: bug 🐞 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants