-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Be able to specify which version of setuptools has to be used #4511
Comments
I had the same issue with % poetry init -n
% poetry shell
% poetry add setuptools==57.2.0
% poetry install
Installing dependencies from lock file
% pip freeze --all |grep setuptools
setuptools==58.0.4
% grep setuptools pyproject.toml
setuptools = "57.2.0"
% poetry add demjson
• Installing demjson (2.2.4): Failed
[...]
Complete output (1 lines):
error in demjson setup command: use_2to3 is invalid.
[...] |
Big thanks @rvanlaar! Your suggestion works well in a Docker container. I've implemented by adding the poetry pip install of setuptools before running
|
Hello, for poetry <1.2 we have marked fin swimmer |
Hi, Thank you for your response and confirmation that the issue can be handled in poetry 1.2. I'm wondering, would it be possible to specify the setuptools version to use in the [build-sytem] part of the configuration? Roland |
Still failing on
|
Works for me with Poetry 1.2.0
|
c65faucet still needs setuptools, but poetry < 1.2.0 ignores .toml dependency for setuptools.
c65faucet still needs setuptools, but poetry < 1.2.0 ignores .toml dependency for setuptools.
Per python-poetry/poetry#4511. c65faucet still needs setuptools, but poetry < 1.2.0 ignores .toml dependency for setuptools.
In Poetry 1.4.1 we apparently can't override the setuptools version. Running # file: pyproject.toml
[tool.poetry]
name = "dummy_projectgym"
version = "0.0.0"
description = ""
authors = []
[tool.poetry.dependencies]
python = ">=3.9,<3.11"
poetry = "1.4.1"
setuptools = "65.6.3" # <-------------- doesn't seem to be used
gym = "0.21" # <--------------
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api" with an error
Adding [build-system]
requires = ["poetry-core>=1.0.0", "setuptools==65.6.3"] The only hacky workaround i found was installing the problematic package through pip within poetry beforehand: $ poetry run pip install gym==0.21.0
$ poetry install Somehow that pip instance uses an older setuptools version (probably the default 58 one) but no idea why. |
The other bit of the error is
Which fails in the same way. i.e. this is not a poetry bug, but an issue with that old version of gym, newer versions of gym (e.g. 0.26.2) are fine; use the most recent version of gym. |
If i could, i would ;). But in a corporate environment you're often stuck with older versions for a while. The issue with Poetry is that it doesn't use the mentioned |
you are wrong, this is not a bug in poetry. (A setuptools dependency in pyproject.toml describes the package that should eventually be installed in the project environment. This has nothing to do with any temporary environment used to build packages such as |
Thanks for the clarification. Is it possible then to specify the |
No. It would be the responsibility of (poetry always uses PEP517 builds with isolated build environments. You could reproduce this in |
Not being able to specify the Currently it is impossible to install I feel like Poetry shouldn't be the one protecting developers from messing with their |
Being unable to install Stable Baselines3 with Poetry is very annoying.
This worked for me, but it's unpleasant to have to do this. |
In the meanwhile we switched to a conda-based environment, where |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Feature Request
I just ran into this bug: tikitu/jsmin#34
Setuptools >=58 removed functionality jsmin relies on.
The result is that jsmin can't be installed and our CI/CD pipeline fails.
My solution was to run the following before a build in out CI:
poetry run pip install --upgrade setuptools==57.5.0
To counter this, it would be great if the setuptools version can be specified in the pyproject.toml.
The text was updated successfully, but these errors were encountered: