ponimatkin / focalpose

[CVPR 2022] Focal Length and Object Pose Estimation via Render and Compare
MIT License
77 stars 9 forks source link

pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: '2.5.5-eglpatched' #5

Closed monajalal closed 1 year ago

monajalal commented 1 year ago

I get this error in Ubuntu 22.04 when following your README.md. Please let me know if you may have any suggestions.

(focalpose) mona@ard-gpu-01:~/focalpose/bullet3$ python setup.py install

-- roboschool/models_outdoor/stadium/part1.obj
-- roboschool/models_outdoor/stadium/stadium.obj
-- roboschool/models_outdoor/stadium/part0.obj
-- roboschool/models_outdoor/stadium/part2.obj
packages
['pybullet_envs', 'pybullet_data', 'pybullet_utils', 'pybullet_envs.baselines', 'pybullet_envs.prediction', 'pybullet_envs.examples', 'pybullet_envs.deep_mimic', 'pybullet_envs.minitaur', 'pybullet_envs.bullet', 'pybullet_envs.agents', 'pybullet_envs.deep_mimic.env', 'pybullet_envs.deep_mimic.learning', 'pybullet_envs.deep_mimic.learning.nets', 'pybullet_envs.deep_mimic.learning.solvers', 'pybullet_envs.minitaur.actuatornet', 'pybullet_envs.minitaur.envs', 'pybullet_envs.minitaur.agents', 'pybullet_envs.minitaur.envs.env_randomizers', 'pybullet_envs.minitaur.agents.tools', 'pybullet_envs.minitaur.agents.ppo', 'pybullet_envs.minitaur.agents.scripts', 'pybullet_envs.agents.tools', 'pybullet_envs.agents.ppo', 'pybullet_data.policies', 'pybullet_data.policies.ppo', 'pybullet_data.policies.ppo.minitaur_trotting_env', 'pybullet_data.policies.ppo.minitaur_reactive_env', 'pybullet_utils.examples']
-----
/home/mona/anaconda3/envs/focalpose/lib/python3.7/site-packages/setuptools/dist.py:552: UserWarning: The version specified ('2.5.5_eglpatched') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.
  "details." % version
/home/mona/anaconda3/envs/focalpose/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  setuptools.SetuptoolsDeprecationWarning,
/home/mona/anaconda3/envs/focalpose/lib/python3.7/site-packages/setuptools/command/easy_install.py:147: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  EasyInstallDeprecationWarning,
Traceback (most recent call last):
  File "setup.py", line 522, in <module>
    package_data={'pybullet_data': need_files})
  File "/home/mona/anaconda3/envs/focalpose/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
  File "/home/mona/anaconda3/envs/focalpose/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/home/mona/anaconda3/envs/focalpose/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/home/mona/anaconda3/envs/focalpose/lib/python3.7/site-packages/setuptools/dist.py", line 1213, in run_command
    super().run_command(command)
  File "/home/mona/anaconda3/envs/focalpose/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/home/mona/anaconda3/envs/focalpose/lib/python3.7/site-packages/setuptools/command/install.py", line 74, in run
    self.do_egg_install()
  File "/home/mona/anaconda3/envs/focalpose/lib/python3.7/site-packages/setuptools/command/install.py", line 123, in do_egg_install
    self.run_command('bdist_egg')
  File "/home/mona/anaconda3/envs/focalpose/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
    self.distribution.run_command(command)
  File "/home/mona/anaconda3/envs/focalpose/lib/python3.7/site-packages/setuptools/dist.py", line 1213, in run_command
    super().run_command(command)
  File "/home/mona/anaconda3/envs/focalpose/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
    cmd_obj.ensure_finalized()
  File "/home/mona/anaconda3/envs/focalpose/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
    self.finalize_options()
  File "/home/mona/anaconda3/envs/focalpose/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 93, in finalize_options
    ei_cmd = self.ei_cmd = self.get_finalized_command("egg_info")
  File "/home/mona/anaconda3/envs/focalpose/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 305, in get_finalized_command
    cmd_obj.ensure_finalized()
  File "/home/mona/anaconda3/envs/focalpose/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
    self.finalize_options()
  File "/home/mona/anaconda3/envs/focalpose/lib/python3.7/site-packages/setuptools/command/egg_info.py", line 219, in finalize_options
    parsed_version = parse_version(self.egg_version)
  File "/home/mona/anaconda3/envs/focalpose/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/version.py", line 197, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: '2.5.5-eglpatched'
ponimatkin commented 1 year ago

Hi, did you run python setup.py build and then python setup.py install in a clean pybullet repo? I remember encountering this error, but doing clean git pull and then running those two commands solved this to me. Could you please try it again?

monajalal commented 1 year ago

I actually ended up just doing pip install for pybullet. Would that not be acceptable?

pip3 install pybullet

https://github.com/bulletphysics/bullet3

ponimatkin commented 1 year ago

Hi, the pybullet version at the https://github.com/ylabbe/bullet3.git is patched specifically to work with GPUs, so you'll need to install it.

mayura1996 commented 1 year ago

Hi, I'm also facing the same issue. Any solutions for this?

mayura1996 commented 1 year ago

Hi, did you run python setup.py build and then python setup.py install in a clean pybullet repo? I remember encountering this error, but doing clean git pull and then running those two commands solved this to me. Could you please try it again?

This one didn't work for me

nmeegan commented 1 year ago

Also having the same issue, on Ubuntu 18.04.5.

ponimatkin commented 1 year ago

Hi all, thanks for the reports, I'll try to investigate issue ASAP.

ponimatkin commented 1 year ago

Hi @nmeegan, @mayura1996 and @monajalal. Sorry it took me so long. It seems the issue should be with setuptools (see https://github.com/pypa/setuptools/issues/3772). Could you please try to downgrade setuptools to some older version, say 61.2.0 and let me know if it helped?

When I tried using latest setuptools it failed, but using something older (61.2.0. explicitly) helped.

nmeegan commented 1 year ago

Hi @ponimatkin, no worries. I will give downgrading setuptools a try as soon as I can. Thank you!

mayura1996 commented 1 year ago

Just to leave you an update, it worked with setup tools 61.2.0. Thank You!