DMTF / Redfishtool

A Python34 program that implements a command line tool for accessing the Redfish API.
Other
224 stars 68 forks source link

python-redfish installation issue #64

Closed chandra0293 closed 4 years ago

chandra0293 commented 5 years ago

sudo pip install --upgrade setuptoolsDownloading/unpacking setuptools from https://files.pythonhosted.org/packages/ec/51/f45cea425fd5cb0b0380f5b0f048ebc1da5b417e48d304838c02d6288a1e/setuptools-41.0.1-py2.py3-none-any.whl#sha256=c7769ce668c7a333d84e17fe8b524b1c45e7ee9f7908ad0a73e1eda7e6a5aebf Downloading setuptools-41.0.1-py2.py3-none-any.whl (575kB): 575kB downloaded Installing collected packages: setuptools Found existing installation: setuptools 3.3 Not uninstalling setuptools at /usr/lib/python2.7/dist-packages, owned by OS Successfully installed setuptools Cleaning up... (redfish)chandra@chandra-OptiPlex-3020:~$ sudo pip install python-redfish Downloading/unpacking python-redfish Downloading python-redfish-0.4.1.tar.gz (6.0MB): 6.0MB downloaded Running setup.py (path:/tmp/pip_build_root/python-redfish/setup.py) egg_info for package python-redfish { 'conf': { u'dst': u'etc', u'fdst': [u'/usr/local/etc/redfish-client.conf'], u'src': [u'redfish-client/etc/redfish-client.conf']}, 'rccusage': { u'dst': u'share/redfish-client/', u'fdst': [ u'/usr/local/share/redfish-client/redfish-check-cartridge_usage.txt'], u'src': [ u'redfish-client/redfish-check-cartridge_usage.txt']}, 'rfcusage': { u'dst': u'share/redfish-client/', u'fdst': [ u'/usr/local/share/redfish-client/redfish-client_usage.txt'], u'src': [u'redfish-client/redfish-client_usage.txt']}, u'script': { u'dst': u'bin', u'fdst': [ u'/usr/local/bin/redfish-client', u'/usr/local/bin/redfish-check-cartridge'], u'src': [ u'redfish-client/redfish-client', u'redfish-client/redfish-check-cartridge']}, 'templates': { u'dst': u'share/redfish-client/templates', u'fdst': [ u'/usr/local/share/redfish-client/templates/manager_info.template', u'/usr/local/share/redfish-client/templates/chassis_info.template', u'/usr/local/share/redfish-client/templates/system_info.template'], u'src': [ u'redfish-client/templates/manager_info.template', u'redfish-client/templates/chassis_info.template', u'redfish-client/templates/system_info.template']}} Searching for pbr Reading https://pypi.python.org/simple/pbr/ Best match: pbr 5.1.3 Downloading https://files.pythonhosted.org/packages/97/76/c151aa4a3054ce63bb6bbd32f3541e4ae068534ed8b74ee2687f6773b013/pbr-5.1.3.tar.gz#sha256=8c361cc353d988e4f5b998555c88098b9d5964c2e11acf7b0d21925a66bb5824 Processing pbr-5.1.3.tar.gz Writing /tmp/easy_install-LgPZk8/pbr-5.1.3/setup.cfg Running pbr-5.1.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-LgPZk8/pbr-5.1.3/egg-dist-tmp-D47MbA /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'long_description_content_type' warnings.warn(msg) /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'project_urls' warnings.warn(msg)

Installed /tmp/pip_build_root/python-redfish/pbr-5.1.3-py2.7.egg
Marker evaluation failed, see the following error.  For more information see: http://docs.openstack.org/pbr/latest/user/using.html#environment-markers
ERROR:root:Error parsing
Traceback (most recent call last):
  File "/tmp/pip_build_root/python-redfish/pbr-5.1.3-py2.7.egg/pbr/core.py", line 96, in pbr
    attrs = util.cfg_to_args(path, dist.script_args)
  File "/tmp/pip_build_root/python-redfish/pbr-5.1.3-py2.7.egg/pbr/util.py", line 258, in cfg_to_args
    kwargs = setup_cfg_to_setup_kwargs(config, script_args)
  File "/tmp/pip_build_root/python-redfish/pbr-5.1.3-py2.7.egg/pbr/util.py", line 456, in setup_cfg_to_setup_kwargs
    if pkg_resources.evaluate_marker('(%s)' % env_marker):
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1271, in evaluate_marker
    return cls.interpret(parser.expr(text).totuple(1)[1])
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1306, in interpret
    return op(nodelist)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1223, in atom
    return cls.interpret(nodelist[2])
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1306, in interpret
    return op(nodelist)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1241, in comparison
    raise SyntaxError(repr(cop)+" operator not allowed in environment markers")
SyntaxError: '<' operator not allowed in environment markers
error in setup command: Error parsing /tmp/pip_build_root/python-redfish/setup.cfg: SyntaxError: '<' operator not allowed in environment markers
Complete output from command python setup.py egg_info:
{   'conf': {   u'dst': u'etc',

            u'fdst': [u'/usr/local/etc/redfish-client.conf'],

            u'src': [u'redfish-client/etc/redfish-client.conf']},

'rccusage': {   u'dst': u'share/redfish-client/',

                u'fdst': [   u'/usr/local/share/redfish-client/redfish-check-cartridge_usage.txt'],

                u'src': [   u'redfish-client/redfish-check-cartridge_usage.txt']},

'rfcusage': {   u'dst': u'share/redfish-client/',

                u'fdst': [   u'/usr/local/share/redfish-client/redfish-client_usage.txt'],

                u'src': [u'redfish-client/redfish-client_usage.txt']},

u'script': {   u'dst': u'bin',

               u'fdst': [   u'/usr/local/bin/redfish-client',

                            u'/usr/local/bin/redfish-check-cartridge'],

               u'src': [   u'redfish-client/redfish-client',

                           u'redfish-client/redfish-check-cartridge']},

'templates': {   u'dst': u'share/redfish-client/templates',

                 u'fdst': [   u'/usr/local/share/redfish-client/templates/manager_info.template',

                              u'/usr/local/share/redfish-client/templates/chassis_info.template',

                              u'/usr/local/share/redfish-client/templates/system_info.template'],

                 u'src': [   u'redfish-client/templates/manager_info.template',

                             u'redfish-client/templates/chassis_info.template',

                             u'redfish-client/templates/system_info.template']}}

Searching for pbr

Reading https://pypi.python.org/simple/pbr/

Best match: pbr 5.1.3

Downloading https://files.pythonhosted.org/packages/97/76/c151aa4a3054ce63bb6bbd32f3541e4ae068534ed8b74ee2687f6773b013/pbr-5.1.3.tar.gz#sha256=8c361cc353d988e4f5b998555c88098b9d5964c2e11acf7b0d21925a66bb5824

Processing pbr-5.1.3.tar.gz

Writing /tmp/easy_install-LgPZk8/pbr-5.1.3/setup.cfg

Running pbr-5.1.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-LgPZk8/pbr-5.1.3/egg-dist-tmp-D47MbA

/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'long_description_content_type'

warnings.warn(msg)

/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'project_urls'

warnings.warn(msg)

Installed /tmp/pip_build_root/python-redfish/pbr-5.1.3-py2.7.egg

Marker evaluation failed, see the following error. For more information see: http://docs.openstack.org/pbr/latest/user/using.html#environment-markers

ERROR:root:Error parsing

Traceback (most recent call last):

File "/tmp/pip_build_root/python-redfish/pbr-5.1.3-py2.7.egg/pbr/core.py", line 96, in pbr

attrs = util.cfg_to_args(path, dist.script_args)

File "/tmp/pip_build_root/python-redfish/pbr-5.1.3-py2.7.egg/pbr/util.py", line 258, in cfg_to_args

kwargs = setup_cfg_to_setup_kwargs(config, script_args)

File "/tmp/pip_build_root/python-redfish/pbr-5.1.3-py2.7.egg/pbr/util.py", line 456, in setup_cfg_to_setup_kwargs

if pkg_resources.evaluate_marker('(%s)' % env_marker):

File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1271, in evaluate_marker

return cls.interpret(parser.expr(text).totuple(1)[1])

File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1306, in interpret

return op(nodelist)

File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1223, in atom

return cls.interpret(nodelist[2])

File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1306, in interpret

return op(nodelist)

File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1241, in comparison

raise SyntaxError(repr(cop)+" operator not allowed in environment markers")

SyntaxError: '<' operator not allowed in environment markers

error in setup command: Error parsing /tmp/pip_build_root/python-redfish/setup.cfg: SyntaxError: '<' operator not allowed in environment markers


Cleaning up... Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/python-redfish Storing debug log for failure in /home/chandra/.pip/pip.log

billdodd commented 5 years ago

The package you are trying to install (python-redfish) is not part of the https://github.com/DMTF organization. It is part of OpenStack:

repo: https://github.com/openstack/python-redfish docs: https://pythonhosted.org/python-redfish/index.html

So, you have opened the issue in the wrong place.

OpenStack doesn't normally use github for issue creation/tracking. They use a different issue tracking system. The page for creating python-redfish issues is here:

https://bugs.launchpad.net/python-redfish/+filebug

That said, I did take a quick look at your error. The error you are getting (SyntaxError: '<' operator not allowed in environment markers) is because you have an old version of the setuptools package. This is mentioned in the python-redfish FAQ. I'm guessing you saw that since your log shows an attempt to update the setuptools package. But, that attempt failed:

sudo pip install --upgrade setuptools
...
Installing collected packages: setuptools
Found existing installation: setuptools 3.3
Not uninstalling setuptools at /usr/lib/python2.7/dist-packages, owned by OS

This article may help you fix that problem: https://askubuntu.com/questions/683601/how-to-upgrade-python-setuptools-12-2-on-ubuntu-15-04

mraineri commented 5 years ago

I should also note that the OpenStack's "python-redfish" package on pypi is is quite stale at this point; it was last updated two years. I'm not sure if you're going to get much support from the group.

We've also been trying to contact the owners of that package to try to have it removed in favor of one that we maintain, but have been unsuccessful on that front. I would recommend trying to use the DMTF Python library for Redfish:

mraineri commented 4 years ago

@chandra0293 did the previous comments address your issue?

mraineri commented 4 years ago

Closing; no updates from submitter