facebookresearch / home-robot

Mobile manipulation research tools for roboticists
MIT License
877 stars 121 forks source link

Cannot import name 'packaging' from 'pkg_resources' #508

Open KopiSoftware opened 3 months ago

KopiSoftware commented 3 months ago

🐛 Bug

Report cannot import name 'packaging' from 'pkg_resources' when running python src/home_robot_hw/home_robot_hw/nodes/simple_grasp_server.py

I solved this by downgrading setuptools to 69.5.1

python -m pip install setuptools==69.5.1
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting setuptools==69.5.1
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/f7/29/13965af254e3373bceae8fb9a0e6ea0d0e571171b80d6646932131d6439b/setuptools-69.5.1-py3-none-any.whl (894 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 894.6/894.6 kB 2.3 MB/s eta 0:00:00
Installing collected packages: setuptools
  Attempting uninstall: setuptools
    Found existing installation: setuptools 70.1.0
    Uninstalling setuptools-70.1.0:
      Successfully uninstalled setuptools-70.1.0
Successfully installed setuptools-69.5.1

Steps to Reproduce

Steps to reproduce the behavior:

python src/home_robot_hw/home_robot_hw/nodes/simple_grasp_server.py

Expected behavior

Successful running

Additional context


pybullet build time: Nov 28 2023 23:52:03
Traceback (most recent call last):
  File "/home/kyle/Programs/AI/home-robot/src/home_robot_hw/home_robot_hw/nodes/simple_grasp_server.py", line 14, in <module>
    from home_robot.manipulation.voxel_grasps import VoxelGraspGenerator
  File "/home/kyle/Programs/AI/home-robot/src/home_robot/home_robot/manipulation/voxel_grasps.py", line 14, in <module>
    from home_robot.mapping.voxel import SparseVoxelMap
  File "/home/kyle/Programs/AI/home-robot/src/home_robot/home_robot/mapping/__init__.py", line 5, in <module>
    from .voxel import SparseVoxelMap, SparseVoxelMapNavigationSpace
  File "/home/kyle/Programs/AI/home-robot/src/home_robot/home_robot/mapping/voxel/__init__.py", line 5, in <module>
    from .planners import plan_to_frontier
  File "/home/kyle/Programs/AI/home-robot/src/home_robot/home_robot/mapping/voxel/planners.py", line 8, in <module>
    from home_robot.mapping.voxel.voxel import SparseVoxelMap
  File "/home/kyle/Programs/AI/home-robot/src/home_robot/home_robot/mapping/voxel/voxel.py", line 21, in <module>
    from home_robot.mapping.instance import Instance, InstanceMemory, InstanceView
  File "/home/kyle/Programs/AI/home-robot/src/home_robot/home_robot/mapping/instance/__init__.py", line 6, in <module>
    from .instance_map import InstanceMemory
  File "/home/kyle/Programs/AI/home-robot/src/home_robot/home_robot/mapping/instance/instance_map.py", line 27, in <module>
    from home_robot.perception.encoders import ClipEncoder
  File "/home/kyle/Programs/AI/home-robot/src/home_robot/home_robot/perception/encoders/__init__.py", line 8, in <module>
    from .clip_encoder import ClipEncoder
  File "/home/kyle/Programs/AI/home-robot/src/home_robot/home_robot/perception/encoders/clip_encoder.py", line 7, in <module>
    import clip
  File "/home/kyle/anaconda3/envs/home-robot/lib/python3.9/site-packages/clip/__init__.py", line 1, in <module>
    from .clip import *
  File "/home/kyle/anaconda3/envs/home-robot/lib/python3.9/site-packages/clip/clip.py", line 6, in <module>
    from pkg_resources import packaging
ImportError: cannot import name 'packaging' from 'pkg_resources'