Skip to content

Conversation

pavoljuhas
Copy link
Contributor

Description

Problem: setuptools-77 requires packaging>=24.2. Installation of pyquil
downgrades packaging to packaging-23 which breaks pre-installed setuptools.

Solution: Let packaging-24 and pyquil coexist in a Python environment.

Example:

$ pip install "setuptools>=77"
$ python -c "import setuptools" 
# OK

$ pip install pyquil
# packaging got downgraded to 23.2

$ python -c "import setuptools"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/t312/lib/python3.12/site-packages/setuptools/__init__.py", line 27, in <module>
    from .dist import Distribution
  File "/tmp/t312/lib/python3.12/site-packages/setuptools/dist.py", line 15, in <module>
    from packaging.licenses import canonicalize_license_expression
ModuleNotFoundError: No module named 'packaging.licenses'

Checklist

  • The PR targets the master branch
  • The above description motivates these changes.
  • The change is atomic and can be described by a single commit (your PR will be squashed on merge).
  • All changes to code are covered via unit tests.
  • Parameters and return values have type hints with PEP 484 syntax.
  • Functions and classes have useful Sphinx-style docstrings.
  • (New Feature) The docs have been updated accordingly.
  • (Bugfix) The associated issue is referenced above using auto-close keywords.

@jselig-rigetti
Copy link
Contributor

Sorry to miss this - will try to fix the pipeline first with #1825 then will run the pipeline here.

@pavoljuhas
Copy link
Contributor Author

I see, thanks for the update!

Problem: setuptools-77 requires packaging>=24.2.  Installation of pyquil
downgrades packaging to packaging-23 which breaks pre-installed setuptools.

Solution: Let packaging-24 and pyquil coexist in a Python environment.
Executed  poetry lock --no-update
@jselig-rigetti jselig-rigetti merged commit e2928bf into rigetti:master Mar 24, 2025
19 of 22 checks passed
@pavoljuhas pavoljuhas deleted the unpin-packaging branch March 24, 2025 23:52
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.

2 participants