MVIG-SJTU / AlphaPose

Real-Time and Accurate Full-Body Multi-Person Pose Estimation&Tracking System
http://mvig.org/research/alphapose.html
Other
8.06k stars 1.98k forks source link

Error in setup.py during installation. Option --user not recognized #1095

Closed 0xNOY closed 1 year ago

0xNOY commented 2 years ago

When I run python3 setup.py build develop --user according to Install with pip in the article, I get an error error: option --user not recognized.

Terminal

(venv) roboworks@roboworks-HP:~/noy_ws/alphapose/AlphaPose$ python setup.py build develop --user
Compiling detector/nms/src/soft_nms_cpu.pyx because it depends on /home/roboworks/noy_ws/alphapose/venv/lib/python3.8/site-packages/Cython/Includes/libc/string.pxd.
[1/1] Cythonizing detector/nms/src/soft_nms_cpu.pyx
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: option --user not recognized

Environment

0xNOY commented 2 years ago

I ran it without the option --user and got the following error.

Processing scipy/optimize/cython_optimize/_zeros.pyx.in
/usr/lib/python3.8/distutils/dist.py:274: UserWarning: Unknown distribution option: 'project_urls'
  warnings.warn(msg)
/usr/lib/python3.8/distutils/dist.py:274: UserWarning: Unknown distribution option: 'install_requires'
  warnings.warn(msg)
/usr/lib/python3.8/distutils/dist.py:274: UserWarning: Unknown distribution option: 'python_requires'
  warnings.warn(msg)
/usr/lib/python3.8/distutils/dist.py:274: UserWarning: Unknown distribution option: 'zip_safe'
  warnings.warn(msg)
error: Setup script exited with usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: invalid command 'bdist_egg'
Fang-Haoshu commented 2 years ago

Hi,we encourage you to use a conda environment, if possible

0xNOY commented 2 years ago

The installation method using conda described in INSTALL.md produced the following error.

$ python setup.py build develop
...
  File "/home/roboworks/miniconda3/envs/alphapose/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/version.py", line 264, in __init__
    match = self._regex.search(version)
TypeError: expected string or bytes-like object
``` (alphapose) roboworks@roboworks-HP:~/noy_ws/AlphaPose$ python setup.py develop No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda' /home/roboworks/miniconda3/envs/alphapose/lib/python3.7/site-packages/setuptools/installer.py:30: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer. SetuptoolsDeprecationWarning, running develop /home/roboworks/miniconda3/envs/alphapose/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, /home/roboworks/miniconda3/envs/alphapose/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, running egg_info creating alphapose.egg-info writing alphapose.egg-info/PKG-INFO writing dependency_links to alphapose.egg-info/dependency_links.txt writing requirements to alphapose.egg-info/requires.txt writing top-level names to alphapose.egg-info/top_level.txt writing manifest file 'alphapose.egg-info/SOURCES.txt' reading manifest file 'alphapose.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'alphapose.egg-info/SOURCES.txt' running build_ext Traceback (most recent call last): File "setup.py", line 213, in zip_safe=False) File "/home/roboworks/miniconda3/envs/alphapose/lib/python3.7/site-packages/setuptools/__init__.py", line 87, in setup return distutils.core.setup(**attrs) File "/home/roboworks/miniconda3/envs/alphapose/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 185, in setup return run_commands(dist) File "/home/roboworks/miniconda3/envs/alphapose/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 201, in run_commands dist.run_commands() File "/home/roboworks/miniconda3/envs/alphapose/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands self.run_command(cmd) File "/home/roboworks/miniconda3/envs/alphapose/lib/python3.7/site-packages/setuptools/dist.py", line 1217, in run_command super().run_command(command) File "/home/roboworks/miniconda3/envs/alphapose/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 987, in run_command cmd_obj.run() File "/home/roboworks/miniconda3/envs/alphapose/lib/python3.7/site-packages/setuptools/command/develop.py", line 34, in run self.install_for_development() File "/home/roboworks/miniconda3/envs/alphapose/lib/python3.7/site-packages/setuptools/command/develop.py", line 114, in install_for_development self.run_command('build_ext') File "/home/roboworks/miniconda3/envs/alphapose/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command self.distribution.run_command(command) File "/home/roboworks/miniconda3/envs/alphapose/lib/python3.7/site-packages/setuptools/dist.py", line 1217, in run_command super().run_command(command) File "/home/roboworks/miniconda3/envs/alphapose/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 987, in run_command cmd_obj.run() File "/home/roboworks/miniconda3/envs/alphapose/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 84, in run _build_ext.run(self) File "/home/roboworks/miniconda3/envs/alphapose/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run self.build_extensions() File "/home/roboworks/miniconda3/envs/alphapose/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 499, in build_extensions _check_cuda_version(compiler_name, compiler_version) File "/home/roboworks/miniconda3/envs/alphapose/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 382, in _check_cuda_version torch_cuda_version = packaging.version.parse(torch.version.cuda) File "/home/roboworks/miniconda3/envs/alphapose/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/version.py", line 49, in parse return Version(version) File "/home/roboworks/miniconda3/envs/alphapose/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/version.py", line 264, in __init__ match = self._regex.search(version) TypeError: expected string or bytes-like object ```
Fang-Haoshu commented 2 years ago

Seems to be a problem of the python setuptools. We haven't met that issue before. Perhaps you can try update the setuptools

Sparkle-Ke commented 1 year ago

We meet the same error, now finding the solution

1475015695 commented 1 year ago

same error

davidpagnon commented 1 year ago

Same here

tasyiann commented 1 year ago

same here

spad commented 1 year ago

same here

Archives-RZ commented 1 year ago

same here