-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Poetry 1.8.5
-- virtualenv: error: unrecognized arguments: --wheel=bundle
#10378
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
Comments
poetry has not provided this setting since #9331, you should upgrade |
Thanks @dimbleby . I figured this might be the case, but wasn't sure if there was a workaround while we made a switch. I'll close this. |
Hi, I'm getting the same error for this simple project [tool.poetry]
name = "containerbase-test"
version = "0.2.1"
description = "Testing"
authors = []
license = "MIT"
[tool.poetry.dependencies]
python = ">3.9"
numpy = "^1.21.3"
PyYAML = "^6.0.1"
pampy = "^0.2.1"
[tool.poetry.dev-dependencies]
pytest = "^4.4"
mock = "^3.0"
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api" $ poetry update --lock --no-interaction
Creating virtualenv containerbase-test-9TtSrW0h-py3.12 in /home/ubuntu/.cache/pypoetry/virtualenvs
Updating dependencies
Resolving dependencies... (0.2s)usage: virtualenv [--version] [--with-traceback] [-v | -q] [--read-only-app-data] [--app-data APP_DATA] [--reset-app-data] [--upgrade-embed-wheels] [--discovery {builtin}] [-p py] [--try-first-with py_exe]
[--creator {builtin,cpython3-posix,venv}] [--seeder {app-data,pip}] [--no-seed] [--activators comma_sep_list] [--clear] [--no-vcs-ignore] [--system-site-packages] [--symlinks | --copies] [--no-download | --download]
[--extra-search-dir d [d ...]] [--pip version] [--setuptools version] [--no-pip] [--no-setuptools] [--no-periodic-update] [--symlink-app-data] [--prompt prompt] [-h]
dest
virtualenv: error: unrecognized arguments: --wheel=bundle
Resolving dependencies... (334.4s)^CException ignored in: <module 'threading' from '/opt/containerbase/tools/python/3.12.10/lib/python3.12/threading.py'>
Traceback (most recent call last):
File "/opt/containerbase/tools/python/3.12.10/lib/python3.12/threading.py", line 1624, in _shutdown
lock.acquire()
KeyboardInterrupt:
$ poetry config --list
cache-dir = "/home/ubuntu/.cache/pypoetry"
experimental.system-git-client = false
installer.max-workers = null
installer.modern-installation = true
installer.no-binary = null
installer.parallel = true
keyring.enabled = true
solver.lazy-wheel = true
virtualenvs.create = true
virtualenvs.in-project = null
virtualenvs.options.always-copy = false
virtualenvs.options.no-pip = false
virtualenvs.options.no-setuptools = false
virtualenvs.options.system-site-packages = false
virtualenvs.path = "{cache-dir}/virtualenvs" # /home/ubuntu/.cache/pypoetry/virtualenvs
virtualenvs.prefer-active-python = false
virtualenvs.prompt = "{project_name}-py{python_version}"
warnings.export = true we did not change any settings, those are the defaults. |
Does it mean poetry v1 can no longer be used? |
oh, found it when using verbose args. needed to upgrade - pytest = "^4.4"
+ pytest = "^7.1" |
Related: pypa/virtualenv#2883 |
Why has this been closed? I'm not clear what the proposed workaround is, other than restricting |
@allanlewis for me it was the |
I don't have either of those dependencies, that seems to be specific to your situation. |
run |
Updating a dependency might fix this but that isn't the root cause: I think it's building any dependency from source. In my case I have a few dependencies without wheels on PyPI, including I'd therefore expect the error reported here to occur in any project with at least one dependency without a platform-compatible wheel on PyPI. A workaround could be to build wheels manually for those dependencies and use |
The only way that this could be fixed from this repository is by a new release: but that is already done - you can upgrade to a more recent poetry and this will go away. If y'all insist on using older poetry you will need to go over to virtualenv and convince the maintainer that they have made a breaking change in a minor release and that they ought to undo that. I've no idea how likely they are to be open to that. |
A workaround is to inject an older version of virtualenv into the poetry environment. If using Here is an example I used:
|
Is the only fix to update to Poetry v2 or pin the virtualenv dependency? The upgrade to Poetry v2 is a major breaking change and will require significant changes to tooling. Right now all of our CI is completely broken due to this issue. |
For PipX you can also do: pipx install 'poetry==1.8.*' --preinstall='virtualenv<20.31.0' That doesn't pin If you already have a PipX virtualenv then the |
virtualenv maintainers actually nailed it with this breaking change, all our pipelines were down then I saw their release notes and it left me speechless Anyways pinning to a clean version of virtualenv (ex 20.30.0) worked perfectly for us (just with a pip install). Looking forward to see how they will be fixing this |
@gsnider2195 pointed out that a better solution is to use |
This fixes an issue with virtualenv 20.31.0 and Poetry 1, see: python-poetry/poetry#10378
Starting with Looks like we'll be dropping |
Virtualenv change breaks older Poetry versions. For more background: python-poetry/poetry#10378 pypa/virtualenv#2883 Using fix mentioned here: python-poetry/poetry#10378 (comment)
Create the `setup-python` and `setup-poetry` actions. Providing our own actions for these allows us to: - Single-source the default versions - Cache the Poetry installation - Isolate the Poetry installation/caching from other software on the runner (e.g. apps installed with pipx) - Single-source workarounds for Poetry installation issues (e.g. python-poetry/poetry#10378 ) - In the future, we could update the `setup-poetry` action to pin Poetry's dependencies Fill in the documentation. Create GitHub issue templates and copy the workflow for syncing GitHub issues to AzDO.
Description
Running
poetry run poetry lock --no-update
, as part of a GitHub Workflow, recently started producing this error:This seems related to
virtualenv
recently No longer bundling wheelwheels
Workarounds
We haven't been able to find a workaround for this
Poetry Installation Method
install.python-poetry.org
Operating System
GitHub Runner: ubuntu-24.04 version 20250427.1.0
Poetry Version
Poetry (version 1.8.5)
Poetry Configuration
Python Sysconfig
sysconfig.log
Example pyproject.toml
Poetry Runtime Logs
poetry-runtime.log
The text was updated successfully, but these errors were encountered: