-
Notifications
You must be signed in to change notification settings - Fork 127
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
SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. #382
Comments
Yes, that is probably the case. This needs to be investigated, but I suspect it will take changes to colcon, ament, and every single python package in the ROS 2 ecosystem. This is on the list to investigate, but since the Humble feature freeze is in 3 working days, this is almost certainly an item for the next release. |
Could you confirm that when you say an item for the next release, you mean this will be addressed as a bug fix into Humble in a future synchronization, and not for the next ROS2 distro? |
It's hard to say, it depends on the nature of the fix. If the fix doesn't break any ABI or API (I guess since this is Python, we'd be worried about API), then we can consider backporting it to Humble once we know what needs to be done. |
Got it. I'd expect we'd want at least a supression of the warning for Humble though as it otherwise shows up everywhere. |
If you have an idea on how to suppress it, a PR for that would be most welcome. |
Just FYI, I'm on Ubuntu 20.04, Python 3.8.10, ROS2 Foxy and when I do |
Note that this is a different warning, though it is also caused by using a newer version of setuptools. In any case, all of those particular warnings have been fixed in later ROS 2 distributions. |
Oh yes, indeed, I copied the wrong warning message. I'm also getting Thanks for the fix, I'll be upgrading as soon as it's released |
I guess this issue isn't specific to Ubuntu22.04 nor ROS2 Rolling, but rather to the @robberthofmanfm what do you get with the following command:
If the version is above v58.3.0, I'd expect the warning to show up. |
Version: 60.10.0 |
I'd like to add that when building with the --symlink-install option I get the following error:
Seems to also be coming from the changes which were made to setuptools. |
@dwffls |
Agreed. Probably to https://github.com/colcon/colcon-core . |
This isn't on my immediate queue but I'm putting the assign on myself to keep track of this over the next long while. We're generally expecting setuptools to match the version in Jammy and the process of moving build backends won't be a small one. |
Today, I also tried to create a basic Python package in ROS 2 Humble and I get more deprication warnings. After entering
I get the output:
|
I notice the same problem (ros2 humble as well), following the official documentation on creating a ROS2 package using ros2 tools to create a simple project and trying to build it: As already noticed in the initial comment for this issue by @ijnek the problem lies in calling python directly in ament_python_install_package.cmake line 143 / ament_python_install_package.cmake line 164 which is not following PEP-518 so its behavior will not be changed back in the future (discussion about it for example in pypa/setuptools#2088 and pypa/setuptools#510), so this is not a bug. How could this issue be resolved for ament_cmake and the documentation? |
@mengchaoheng you have another issue that is not connected to the SetuptoolsDeprecationWarning that is already closed here: ros2/examples#351 . |
I am having the SetupToolDeprecationWarning when I was trying to build the package as per this ros2 tutorial. I have Ubuntu 22.04 running ROS2 Humble on my machine. Is there a fix available for this issue? |
EDIT: ignore this, see last comment by @clalancette |
I'm still having this issue in an updated version of Ubuntu 22.04/ROS2 Humble. The downgrade works, but I'd rather not have to do that on every machine we have. |
The recommended workaround here is not to downgrade setuptools; that leaves you with a system that is not tested. Instead, the recommended workaround is to suppress that particular warning. See https://robotics.stackexchange.com/a/24349 for details. |
Is there any update on this now that Iron has been released? |
Yes, we have a fix in progress: https://discourse.ros.org/t/call-for-testing-standards-based-python-packaging-with-colcon/32008 |
was this already fixed? I still get the warning, using the official docker container? |
Still the same answer as #382 (comment) , unfortunately. We hope to have it fixed for Jazzy in May 2024. |
Hello! I've come across some concerning behavior when you install
But now, if you try to colcon build, it blows up.
This is super odd, because my system
Perhaps there is a way using |
@Ryanf55, the problem you're facing has nothing to do with the deprecation of setup.py. The CMake logic currently part of ROS 2 will select the most recent Python interpreter installed on your system when it needs to invoke a Python subprocess. This is not necessarily the interpreter behind by the Distutils has indeed been removed from the Python standard library, which is why setuptools prior to 66.1.0 will not work on Python 3.12. If you had a newer version of setuptools you would not experience this error, but it's likely that you'd hit other problems later in the build due to unavailable Python dependencies which are packaged for Python 3.10 and not Python 3.12. To work around this issue, pass this to your builds: The ROS 2 team discussed this issue last week, but we haven't arrived at a proposed solution quite yet. |
Thanks for the detailed information and workaround. I'm going to move this to a separate issue because it's an error instead of a warning and caused by different mechanisms. See just above ^ |
@clalancette thanks for the various updates and progress on this issue. I haven't yet seen the Infrastructure Community meeting recording due to a lack of time, however I wanted to verify with you whether an easy fix is to just replace Maybe this was already addressed in the Infrastructure Community meeting, so I apologize for bringing it up, but getting an update from you or anyone else in the Infrastructure Community would be amazing. Thanks again for the great work with ROS2! |
I would like to highlight this: when used with I'm fine with the warning message, but it's not acceptable to the installation failure hidden by a warning message. |
How is the progress with this? I am facing this issue with Jazzy. |
SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
shows up when building any python package in Ubuntu22.04 with ROS2 Rolling.Reproduce Instructions (On Ubuntu22.04):
Output:
Perhaps this is coming from the direct invocations of
setup.py
in ament_python_install_package.cmake?I swear this was being discussed somewhere before, but I can't seem to find the conversation.
Related: https://answers.ros.org/question/396439/setuptoolsdeprecationwarning-setuppy-install-is-deprecated-use-build-and-pip-and-other-standards-based-tools/?answer=398274#post-id-398274
The text was updated successfully, but these errors were encountered: