ylabbe / cosypose

Code for "CosyPose: Consistent multi-view multi-object 6D pose estimation", ECCV 2020.
MIT License
301 stars 89 forks source link

ModuleNotFoundError: No module named 'eigenpy.eigenpy_pywrap' #73

Closed nikonnext closed 2 years ago

nikonnext commented 2 years ago

Good day, thanks for the good work.

I would like to get to know your work better, see how the various modules work. However, when launching and training and generating, I get the same error everywhere: No module named 'eigenpy.eigenpy_pywrap'

For example, using the following commands, I start generating a synthetic dataset: export CUDA_VISIBLE_DEVICES=0 python -m cosypose.scripts.run_dataset_recording --config tless --local And in response I get the following output: `Setting OMP and MKL num threads to 1. using config tless overwrite False ds_name tless-1M n_frames_per_chunk 100 n_chunks 2 train_ratio 0.95 distributed False n_workers 6 n_processes_per_gpu 1 scene_cls cosypose.recording.bop_recording_scene.BopRecordingScene scene_kwargs {'gpu_renderer': True, 'texture_ds': 'shapenet', 'domain_randomization': True, 'n_objects_interval': (3, 9), 'proba_falling': 0.5, 'border_check': False, 'n_textures_cache': 100, 'objects_xyz_interval': ((-0.25, -0.25, 0.0), (0.25, 0.25, 0.25)), 'focal_interval': ((1060, 1060), (1080, 1080)), 'urdf_ds': 'tless.cad', 'resolution': (720, 540), 'textures_on_objects': True, 'camera_distance_interval': (0.65, 0.94)} resume ds_dir /home/nikita/cosypose/local_data/synt_datasets/tless-1M STARTING DATASET RECORDING tless-1M

Setting OMP and MKL num threads to 1. Setting OMP and MKL num threads to 1. Setting OMP and MKL num threads to 1. Setting OMP and MKL num threads to 1. 0%| | 0/200 [00:00<?, ?frame/s]distributed.worker - WARNING - Compute Failed Function: record_chunk args: () kwargs: {'ds_dir': PosixPath('/home/nikita/cosypose/local_data/synt_datasets/tless-1M'), 'seed': 1, 'n_frames': 100, 'scene_cls': 'cosypose.recording.bop_recording_scene.BopRecordingScene', 'scene_kwargs': {'gpu_renderer': True, 'texture_ds': 'shapenet', 'domain_randomization': True, 'n_objects_interval': (3, 9), 'proba_falling': 0.5, 'border_check': False, 'n_textures_cache': 100, 'objects_xyz_interval': ((-0.25, -0.25, 0.0), (0.25, 0.25, 0.25)), 'focal_interval': ((1060, 1060), (1080, 1080)), 'urdf_ds': 'tless.cad', 'resolution': (720, 540), 'textures_on_objects': True, 'camera_distance_interval': (0.65, 0.94)}} Exception: ModuleNotFoundError("No module named 'eigenpy.eigenpy_pywrap'")

Traceback (most recent call last): File "/home/nikita/anaconda3/envs/cosypose/lib/python3.7/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/home/nikita/anaconda3/envs/cosypose/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/nikita/cosypose/cosypose/scripts/run_dataset_recording.py", line 113, in main() File "/home/nikita/cosypose/cosypose/scripts/run_dataset_recording.py", line 109, in main record_dataset(cfg) File "/home/nikita/cosypose/cosypose/recording/record_dataset.py", line 128, in record_dataset resume=args.resume) File "/home/nikita/cosypose/cosypose/recording/record_dataset.py", line 54, in record_dataset_dask keys, seed = future.result() File "/home/nikita/anaconda3/envs/cosypose/lib/python3.7/site-packages/distributed/client.py", line 233, in result raise exc.with_traceback(tb) File "/home/nikita/cosypose/cosypose/recording/record_chunk.py", line 57, in record_chunk scene_cls = get_cls(scene_cls) File "/home/nikita/cosypose/cosypose/recording/record_chunk.py", line 13, in get_cls mod = importlib.import_module(mod_name) File "/home/nikita/anaconda3/envs/cosypose/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "/home/nikita/cosypose/cosypose/recording/bop_recording_scene.py", line 7, in from cosypose.datasets.datasets_cfg import make_urdf_dataset, make_texture_dataset File "/home/nikita/cosypose/cosypose/datasets/datasets_cfg.py", line 8, in from .bop import BOPDataset, remap_bop_targets File "/home/nikita/cosypose/cosypose/datasets/bop.py", line 11, in from cosypose.lib3d import Transform File "/home/nikita/cosypose/cosypose/lib3d/init.py", line 1, in from .transform import Transform, parse_pose_args File "/home/nikita/cosypose/cosypose/lib3d/transform.py", line 3, in import eigenpy File "/opt/ros/noetic/lib/python3/dist-packages/eigenpy/init.py", line 5, in from .eigenpy_pywrap import * ModuleNotFoundError: No module named 'eigenpy.eigenpy_pywrap' distributed.worker - WARNING - Compute Failed Function: record_chunk args: () kwargs: {'ds_dir': PosixPath('/home/nikita/cosypose/local_data/synt_datasets/tless-1M'), 'seed': 0, 'n_frames': 100, 'scene_cls': 'cosypose.recording.bop_recording_scene.BopRecordingScene', 'scene_kwargs': {'gpu_renderer': True, 'texture_ds': 'shapenet', 'domain_randomization': True, 'n_objects_interval': (3, 9), 'proba_falling': 0.5, 'border_check': False, 'n_textures_cache': 100, 'objects_xyz_interval': ((-0.25, -0.25, 0.0), (0.25, 0.25, 0.25)), 'focal_interval': ((1060, 1060), (1080, 1080)), 'urdf_ds': 'tless.cad', 'resolution': (720, 540), 'textures_on_objects': True, 'camera_distance_interval': (0.65, 0.94)}} Exception: ModuleNotFoundError("No module named 'eigenpy.eigenpy_pywrap'")

distributed.core - ERROR - Exception while handling op register-client Traceback (most recent call last): File "/home/nikita/anaconda3/envs/cosypose/lib/python3.7/site-packages/distributed/core.py", line 502, in handle_comm result = await result File "/home/nikita/anaconda3/envs/cosypose/lib/python3.7/site-packages/distributed/scheduler.py", line 5224, in add_client self.remove_client(client=client) File "/home/nikita/anaconda3/envs/cosypose/lib/python3.7/site-packages/distributed/scheduler.py", line 5252, in remove_client keys=[ts._key for ts in cs._wants_what], client=cs._client_key File "/home/nikita/anaconda3/envs/cosypose/lib/python3.7/site-packages/distributed/scheduler.py", line 4991, in client_releases_keys self.transitions(recommendations) File "/home/nikita/anaconda3/envs/cosypose/lib/python3.7/site-packages/distributed/scheduler.py", line 7026, in transitions self.send_all(client_msgs, worker_msgs) File "/home/nikita/anaconda3/envs/cosypose/lib/python3.7/site-packages/distributed/scheduler.py", line 5508, in send_all w = stream_comms[worker] KeyError: 'tcp://127.0.0.1:33221' tornado.application - ERROR - Exception in callback functools.partial(<function TCPServer._handle_connection.. at 0x7f16d8388e60>, <Task finished coro=<BaseTCPListener._handle_stream() done, defined at /home/nikita/anaconda3/envs/cosypose/lib/python3.7/site-packages/distributed/comm/tcp.py:493> exception=KeyError('tcp://127.0.0.1:33221')>) Traceback (most recent call last): File "/home/nikita/anaconda3/envs/cosypose/lib/python3.7/site-packages/tornado/ioloop.py", line 741, in _run_callback ret = callback() File "/home/nikita/anaconda3/envs/cosypose/lib/python3.7/site-packages/tornado/tcpserver.py", line 331, in gen.convert_yielded(future), lambda f: f.result() File "/home/nikita/anaconda3/envs/cosypose/lib/python3.7/site-packages/distributed/comm/tcp.py", line 510, in _handle_stream await self.comm_handler(comm) File "/home/nikita/anaconda3/envs/cosypose/lib/python3.7/site-packages/distributed/core.py", line 502, in handle_comm result = await result File "/home/nikita/anaconda3/envs/cosypose/lib/python3.7/site-packages/distributed/scheduler.py", line 5224, in add_client self.remove_client(client=client) File "/home/nikita/anaconda3/envs/cosypose/lib/python3.7/site-packages/distributed/scheduler.py", line 5252, in remove_client keys=[ts._key for ts in cs._wants_what], client=cs._client_key File "/home/nikita/anaconda3/envs/cosypose/lib/python3.7/site-packages/distributed/scheduler.py", line 4991, in client_releases_keys self.transitions(recommendations) File "/home/nikita/anaconda3/envs/cosypose/lib/python3.7/site-packages/distributed/scheduler.py", line 7026, in transitions self.send_all(client_msgs, worker_msgs) File "/home/nikita/anaconda3/envs/cosypose/lib/python3.7/site-packages/distributed/scheduler.py", line 5508, in send_all w = stream_comms[worker] KeyError: 'tcp://127.0.0.1:33221' however i have eigenpy installed. When calling conda list i have the following version: eigen 3.4.0 h4bd325d_0 conda-forge eigenpy 2.6.0 py37h9f31c8f_0 conda-forge`

Please tell me how to resolve this error.

123kipro commented 2 years ago

Hello, I get the same error. Did you find a solution for this problem?

bibekyess commented 2 years ago

Hello @123kipro and @nikonnext How do we solve this problem? Thank you!

123kipro commented 2 years ago

@bibekyess This error occured because eigenpy was installed more than once. I solved this problem by removing the path to the other locations, like sys.path.remove('/opt/ros/noetic/lib/python3/dist-packages') sys.path.remove('/usr/lib/python3/dist-packages')

bibekyess commented 2 years ago

@123kipro Thank you!