Mona Jalal
Mona Jalal

Reputation: 38255

setuptools_scm.version.SetuptoolsOutdatedWarning: your setuptools is too old (<12)

I get the following error when I am trying to run a command: setuptools_scm.version.SetuptoolsOutdatedWarning: your setuptools is too old (<12)

[jalal@goku smplx]$ source activate /scratch/mySmplx
(/scratch/mySmplx) [jalal@goku smplx]$ sudo python setup.py install
[sudo] password for jalal: 
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
  warnings.warn(msg)
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'long_description_content_type'
  warnings.warn(msg)
running install
running bdist_egg
running egg_info
writing requirements to smplx.egg-info/requires.txt
writing smplx.egg-info/PKG-INFO
writing top-level names to smplx.egg-info/top_level.txt
writing dependency_links to smplx.egg-info/dependency_links.txt
reading manifest file 'smplx.egg-info/SOURCES.txt'
writing manifest file 'smplx.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/smplx
copying build/lib/smplx/__init__.py -> build/bdist.linux-x86_64/egg/smplx
copying build/lib/smplx/body_models.py -> build/bdist.linux-x86_64/egg/smplx
copying build/lib/smplx/lbs.py -> build/bdist.linux-x86_64/egg/smplx
copying build/lib/smplx/utils.py -> build/bdist.linux-x86_64/egg/smplx
copying build/lib/smplx/vertex_ids.py -> build/bdist.linux-x86_64/egg/smplx
copying build/lib/smplx/vertex_joint_selector.py -> build/bdist.linux-x86_64/egg/smplx
creating build/bdist.linux-x86_64/egg/tools
copying build/lib/tools/__init__.py -> build/bdist.linux-x86_64/egg/tools
copying build/lib/tools/clean_ch.py -> build/bdist.linux-x86_64/egg/tools
copying build/lib/tools/merge_smplh_mano.py -> build/bdist.linux-x86_64/egg/tools
byte-compiling build/bdist.linux-x86_64/egg/smplx/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/smplx/body_models.py to body_models.pyc
byte-compiling build/bdist.linux-x86_64/egg/smplx/lbs.py to lbs.pyc
byte-compiling build/bdist.linux-x86_64/egg/smplx/utils.py to utils.pyc
byte-compiling build/bdist.linux-x86_64/egg/smplx/vertex_ids.py to vertex_ids.pyc
byte-compiling build/bdist.linux-x86_64/egg/smplx/vertex_joint_selector.py to vertex_joint_selector.pyc
byte-compiling build/bdist.linux-x86_64/egg/tools/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/tools/clean_ch.py to clean_ch.pyc
byte-compiling build/bdist.linux-x86_64/egg/tools/merge_smplh_mano.py to merge_smplh_mano.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying smplx.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying smplx.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying smplx.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying smplx.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying smplx.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/smplx-0.1.12-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing smplx-0.1.12-py2.7.egg
Removing /usr/lib/python2.7/site-packages/smplx-0.1.12-py2.7.egg
Copying smplx-0.1.12-py2.7.egg to /usr/lib/python2.7/site-packages
smplx 0.1.12 is already the active version in easy-install.pth

Installed /usr/lib/python2.7/site-packages/smplx-0.1.12-py2.7.egg
Processing dependencies for smplx==0.1.12
Searching for torchgeometry>=0.1.2
Reading https://pypi.python.org/simple/torchgeometry/
Best match: torchgeometry 0.1.2
Downloading https://files.pythonhosted.org/packages/3e/bb/5a7c43067349a2e85a3ccb249e4a2ff6518358e40be1a3062f94f34ca8e9/torchgeometry-0.1.2.tar.gz#sha256=5d9129e709baaeece5298d9d27a3a3961ac0659264846392138c785520bdb872
Processing torchgeometry-0.1.2.tar.gz
Writing /tmp/easy_install-P16rtH/torchgeometry-0.1.2/setup.cfg
Running torchgeometry-0.1.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-P16rtH/torchgeometry-0.1.2/egg-dist-tmp-CO2LAX
fatal: Not a git repository (or any parent up to mount point /scratch)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Building wheel torchgeometry-0.1.2
-- Building version 0.1.2
Searching for pytest-runner
Reading https://pypi.python.org/simple/pytest-runner/
Best match: pytest-runner 5.1
Downloading https://files.pythonhosted.org/packages/d9/6d/4b41a74b31720e25abd4799be72d54811da4b4d0233e38b75864dcc1f7ad/pytest-runner-5.1.tar.gz#sha256=25a013c8d84f0ca60bb01bd11913a3bcab420f601f0f236de4423074af656e7a
Processing pytest-runner-5.1.tar.gz
Writing /tmp/easy_install-P16rtH/torchgeometry-0.1.2/temp/easy_install-HMBaMz/pytest-runner-5.1/setup.cfg
Running pytest-runner-5.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-P16rtH/torchgeometry-0.1.2/temp/easy_install-HMBaMz/pytest-runner-5.1/egg-dist-tmp-I4_gq3
Searching for setuptools-scm>=1.15.0
Reading https://pypi.python.org/simple/setuptools_scm/
Best match: setuptools-scm 3.3.3
Downloading https://files.pythonhosted.org/packages/67/5b/2d33876bfa52b0ecb14b206bd6007a1c7a56bb75ae24ededed8cb1df52b1/setuptools_scm-3.3.3-py2.7.egg#sha256=edad82da602e45b3c4eae9b6a4adc718ea6659f1434c3a344b05cc629cb6d0c4
Processing setuptools_scm-3.3.3-py2.7.egg
Moving setuptools_scm-3.3.3-py2.7.egg to /scratch/tmp/easy_install-P16rtH/torchgeometry-0.1.2/temp/easy_install-HMBaMz/pytest-runner-5.1

Installed /scratch/tmp/easy_install-P16rtH/torchgeometry-0.1.2/temp/easy_install-HMBaMz/pytest-runner-5.1/setuptools_scm-3.3.3-py2.7.egg
Traceback (most recent call last):
  File "setup.py", line 79, in <module>
    packages=['smplx', 'tools'])
  File "/usr/lib64/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/site-packages/setuptools/command/install.py", line 73, in run
    self.do_egg_install()
  File "/usr/lib/python2.7/site-packages/setuptools/command/install.py", line 101, in do_egg_install
    cmd.run()
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 380, in run
    self.easy_install(spec, not self.no_deps)
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 604, in easy_install
    return self.install_item(None, spec, tmpdir, deps, True)
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 655, in install_item
    self.process_distribution(spec, dist, deps)
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 706, in process_distribution
    [requirement], self.local_index, self.easy_install
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 618, in resolve
    dist = best[req.key] = env.best_match(req, self, installer)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 862, in best_match
    return self.obtain(req, installer) # try and download/install
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 874, in obtain
    return installer(requirement)
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 623, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 653, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 849, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1130, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1115, in run_setup
    run_setup(setup_script, args)
  File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 69, in run_setup
    lambda: execfile(
  File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 120, in run
    return func()
  File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 71, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'}
  File "setup.py", line 91, in <module>

  File "/usr/lib64/python2.7/distutils/core.py", line 112, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 265, in __init__
    self.fetch_build_eggs(attrs.pop('setup_requires'))
  File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 289, in fetch_build_eggs
    parse_requirements(requires), installer=self.fetch_build_egg
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 618, in resolve
    dist = best[req.key] = env.best_match(req, self, installer)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 862, in best_match
    return self.obtain(req, installer) # try and download/install
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 874, in obtain
    return installer(requirement)
  File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 339, in fetch_build_egg
    return cmd.easy_install(req)
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 623, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 653, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 849, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1130, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1115, in run_setup
    run_setup(setup_script, args)
  File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 69, in run_setup
    lambda: execfile(
  File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 120, in run
    return func()
  File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 71, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'}
  File "setup.py", line 21, in <module>
    from setuptools import setup
  File "/usr/lib64/python2.7/distutils/core.py", line 112, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 269, in __init__
    _Distribution.__init__(self,attrs)
  File "/usr/lib64/python2.7/distutils/dist.py", line 287, in __init__
    self.finalize_options()
  File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 302, in finalize_options
    ep.load()(self, ep.name, value)
  File "/scratch/tmp/easy_install-P16rtH/torchgeometry-0.1.2/temp/easy_install-HMBaMz/pytest-runner-5.1/setuptools_scm-3.3.3-py2.7.egg/setuptools_scm/integration.py", line 9, in version_keyword
  File "/scratch/tmp/easy_install-P16rtH/torchgeometry-0.1.2/temp/easy_install-HMBaMz/pytest-runner-5.1/setuptools_scm-3.3.3-py2.7.egg/setuptools_scm/version.py", line 66, in _warn_if_setuptools_outdated
setuptools_scm.version.SetuptoolsOutdatedWarning: your setuptools is too old (<12)

I am following the instructions in this git repository and have already cloned the repo: https://github.com/vchoutas/smplx

I tried it with both normal Python as well as Anaconda Python but same error:

(/scratch/mySmplx) [jalal@goku smplx]$ which python
/scratch/mySmplx/bin/python
(/scratch/mySmplx) [jalal@goku smplx]$ python -V
Python 3.7.3

and

[jalal@goku ~]$ python -V
Python 3.6.4 :: Anaconda custom (64-bit)

How should I fix this problem in CentOS?

$ uname -a
Linux goku.bu.edu 3.10.0-957.12.2.el7.x86_64 #1 SMP Tue May 14 21:24:32 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

The following did not resolved the problem:

$ pip install --user --upgrade setuptools pip
Requirement already up-to-date: setuptools in /home/grad3/jalal/.local/lib/python3.6/site-packages (41.2.0)
Requirement already up-to-date: pip in /home/grad3/jalal/.local/lib/python3.6/site-packages (19.2.3)

Upvotes: 5

Views: 6354

Answers (1)

sinoroc
sinoroc

Reputation: 22438

Your version of setuptools is too old. You probably can figure its version number by running this in your virtual environment:

python -c "import setuptools; print(setuptools.__version__)"

You can remedy to it by running the following command in your virtual environment before trying to install the package:

pip install --upgrade setuptools

Notes

There are inconsistencies in your question...

There often is no good reason to use sudo to install Python packages. Even more so from within a Python virtual environment.

There is often no good reason to use the --user option of pip install from within a virtual environment.

Your question is a very common one, before going any further you should get yourself comfortable with the topic of "Virtual Environments and Packages".


In short:

  • create a virtual environment: python3 -m venv .venv
  • activate the virtual environment: . .venv/bin/activate
  • update the virtual environment: pip install --upgrade pip setuptools
  • use the virtual environment: pip install smplx[all]

Upvotes: 5

Related Questions