공부중

[ROS2] error 해결 EasyInstallDeprecationWarning: easy_install command is deprecated. 본문

프로그래밍/ROS

[ROS2] error 해결 EasyInstallDeprecationWarning: easy_install command is deprecated.

복습 2024. 10. 20. 16:57
728x90

우분투 22.04

ros2 humble

 

1번 문제

UserWarning: Unknown distribution option: 'tests_require'
  warnings.warn(msg)

 

2번 문제

EasyInstallDeprecationWarning: easy_install command is deprecated.

 

은근히 gpt가 도움이 안된다

역시 정공법은 인터넷 검색인듯

 

발생한 오류는 두가지였다. 

더보기
ye2202@ye2202-HP-Laptop-14s-fq0xxx:~/ros2_ws$ ccbs
Starting >>> ros_study_msgs
Starting >>> ex_calculator
Starting >>> my_package1212
Starting >>> py_pubsub
Starting >>> ros2env
/home/ye2202/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
  warnings.warn(msg)
/home/ye2202/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
  warnings.warn(msg)
/home/ye2202/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
  warnings.warn(msg)
Finished <<< ros_study_msgs [1.32s]                                                                                                       
Starting >>> ros_study_py
/home/ye2202/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
  warnings.warn(msg)
--- stderr: ex_calculator                                                                                                                 
/home/ye2202/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
  warnings.warn(msg)
/home/ye2202/.local/lib/python3.10/site-packages/setuptools/command/develop.py:41: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!

        ********************************************************************************
        Please avoid running `setup.py and easy_install.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://github.com/pypa/setuptools/issues/917 for details.
        ********************************************************************************

!!
  easy_install.initialize_options(self)
---
Finished <<< ex_calculator [2.32s]
--- stderr: py_pubsub
/home/ye2202/.local/lib/python3.10/site-packages/setuptools/command/develop.py:41: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!

        ********************************************************************************
        Please avoid running `setup.py and easy_install.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://github.com/pypa/setuptools/issues/917 for details.
        ********************************************************************************

!!
  easy_install.initialize_options(self)
---
Finished <<< py_pubsub [2.32s]
--- stderr: ros2env
/home/ye2202/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
  warnings.warn(msg)
/home/ye2202/.local/lib/python3.10/site-packages/setuptools/command/develop.py:41: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!

        ********************************************************************************
        Please avoid running `setup.py and easy_install.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://github.com/pypa/setuptools/issues/917 for details.
        ********************************************************************************

!!
  easy_install.initialize_options(self)
---
Finished <<< ros2env [2.32s]
--- stderr: my_package1212
/home/ye2202/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
  warnings.warn(msg)
/home/ye2202/.local/lib/python3.10/site-packages/setuptools/command/develop.py:41: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!

        ********************************************************************************
        Please avoid running `setup.py and easy_install.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://github.com/pypa/setuptools/issues/917 for details.
        ********************************************************************************

!!
  easy_install.initialize_options(self)
---
Finished <<< my_package1212 [2.34s]
--- stderr: ros_study_py                   
/home/ye2202/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
  warnings.warn(msg)
/home/ye2202/.local/lib/python3.10/site-packages/setuptools/command/develop.py:41: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!

        ********************************************************************************
        Please avoid running `setup.py and easy_install.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://github.com/pypa/setuptools/issues/917 for details.
        ********************************************************************************

!!
  easy_install.initialize_options(self)
---
Finished <<< ros_study_py [1.52s]

Summary: 6 packages finished [2.99s]
  5 packages had stderr output: ex_calculator my_package1212 py_pubsub ros2env ros_study_py
ye2202@ye2202-HP-Laptop-14s-fq0xxx:~/ros2_ws$

 

첫번째 오류는 아래와 같다. 이거때문에 모든 패키지에 있는 setup.py 수정했는데.. 

2번 오류 해결한 방법으로 같이 해결 될거 같은데.. 

.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
  warnings.warn(msg)

 

setup.py에 서 아래와 같이 ests_require=['pytest']를 주석처리한다. 

# setup.py 파일 예시
from setuptools import setup

setup(
    name='my_package',
    version='0.1.0',
    # tests_require=['pytest'], # 이 줄을 주석 처리하거나 삭제하세요.
    install_requires=[
        # 의존성 목록
    ],
)

 

 

두번쨰 문제를 아래와 같다. 

/.local/lib/python3.10/site-packages/setuptools/command/develop.py:41: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` and ``easy_install``.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://github.com/pypa/setuptools/issues/917 for details.
        ********************************************************************************

!!
  easy_install.initialize_options(self)

 

 

 

다운그레이드 하면 되는듯 

pip3 install setuptools==58.2.0

 

ye2202@ye2202-HP-Laptop-14s-fq0xxx:~/ros2_ws$ pip3 install setuptools==58.2.0
Defaulting to user installation because normal site-packages is not writeable
Collecting setuptools==58.2.0
  Downloading setuptools-58.2.0-py3-none-any.whl (946 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 946.1/946.1 KB 13.6 MB/s eta 0:00:00
Installing collected packages: setuptools
  Attempting uninstall: setuptools
    Found existing installation: setuptools 75.2.0
    Uninstalling setuptools-75.2.0:
      Successfully uninstalled setuptools-75.2.0
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
jupyterlab 4.2.4 requires httpx>=0.25.0, but you have httpx 0.13.3 which is incompatible.
Successfully installed setuptools-58.2.0
ye2202@ye2202-HP-Laptop-14s-fq0xxx:~/ros2_ws$
728x90

'프로그래밍 > ROS' 카테고리의 다른 글

[ROS2]  (2) 2024.10.24
[ROS2] error 해결 $ ros2 run tf2_tools view_frames No executable found  (0) 2024.10.22
[ROS2] turtlesim 동작  (0) 2024.10.07
[ROS2] urdf 패키지 만들기  (0) 2024.10.06
[ROS2] turtlesim 기본 실행  (0) 2024.10.05