Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install fails with pip because of a download error for coverage module #47

Closed
chrismatta opened this issue Nov 18, 2013 · 4 comments
Closed

Comments

@chrismatta
Copy link

Installing xmltodict with pip fails complaining about not being able to find coverage:

$ pip install xmltodict
Downloading/unpacking xmltodict
  Downloading xmltodict-0.8.3.tar.gz
  Running setup.py egg_info for package xmltodict
    Download error on https://pypi.python.org/simple/coverage/: [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate ve
rify failed -- Some packages may not be found!
    Couldn't find index page for 'coverage' (maybe misspelled?)
    Download error on https://pypi.python.org/simple/: [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify fail
ed -- Some packages may not be found!
    No local packages or download links found for coverage
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/tmp/pip_build_sspadmin/xmltodict/setup.py", line 36, in <module>
        setup_requires=['nose>=1.0', 'coverage'],
      File "/home/sspadmin/.pyenv/versions/2.7.5/lib/python2.7/distutils/core.py", line 112, in setup
        _setup_distribution = dist = klass(attrs)
      File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 239, in __init__
      File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 263, in fetch_build_eggs
      File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 568, in resolve
      File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 806, in best_match
      File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 818, in obtain
      File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 313, in fetch_build_egg
      File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 603, in easy_install
    distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('coverage')
    Complete output from command python setup.py egg_info:
    Download error on https://pypi.python.org/simple/coverage/: [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate ve
rify failed -- Some packages may not be found!

Couldn't find index page for 'coverage' (maybe misspelled?)

Download error on https://pypi.python.org/simple/: [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed -
- Some packages may not be found!

No local packages or download links found for coverage

Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/tmp/pip_build_sspadmin/xmltodict/setup.py", line 36, in <module>

    setup_requires=['nose>=1.0', 'coverage'],

  File "/home/sspadmin/.pyenv/versions/2.7.5/lib/python2.7/distutils/core.py", line 112, in setup

    _setup_distribution = dist = klass(attrs)

  File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 239, in __init__

  File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 263, in fetch_build_eggs

  File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 568, in resolve

  File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 806, in best_match

  File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 818, in obtain

  File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 313, in fetch_build_egg

  File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 603, in easy_install

distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('coverage')

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_sspadmin/xmltodict

However installation of coverage can be done with pip install coverage and then pip install xmltodict works fine. Any ideas?

@grzn
Copy link

grzn commented Dec 2, 2013

coverage and nose need to be in test_requires, not setup_requires

@lovato
Copy link

lovato commented Jan 31, 2014

Exactly.
My two cents:

The solution is to install each dependency by hand, so it works.

Best
Marco

martinblech added a commit that referenced this issue Feb 1, 2014
@martinblech
Copy link
Owner

@chrismatta @grzn @lovato thanks for your input. This issue should have been fixed with release 0.8.4. Could you please verify this is so from your side? Thanks!

@chrismatta
Copy link
Author

$ virtualenv .virtualenvs/test_xmltodict                                                               
New python executable in .virtualenvs/test_xmltodict/bin/python
Installing Setuptools..............................................................................................................................................................................................................................done.
Installing Pip.....................................................................................................................................................................................................................................................................................................................................done.

$ source .virtualenvs/test_xmltodict/bin/activate                                                      
(test_xmltodict)
$ pip install xmltodict                                                                                
Downloading/unpacking xmltodict
  Downloading xmltodict-0.8.4.tar.gz
  Running setup.py egg_info for package xmltodict

Installing collected packages: xmltodict
  Running setup.py install for xmltodict

Successfully installed xmltodict
Cleaning up...
(test_xmltodict)

Looks good. Thanks for the response.

lguohan added a commit to sonic-net/sonic-buildimage that referenced this issue Apr 8, 2021
Fix #7248

Issue is similiar to martinblech/xmltodict#47

The correct solution is to change mockredispy to move
nose from setup_requirement to test_requirement.

The quick workaround is to install nose explicitly.

fix build issue:

05:09:37    Downloading mockredispy-2.9.3.tar.gz (17 kB)
05:09:39  ?[91m    ERROR: Command errored out with exit status 1:
05:09:39       command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-sypos2ry/mockredispy_ab86cd14995544df90f78a63ab7041a3/setup.py'"'"'; __file__='"'"'/tmp/pip-install-sypos2ry/mockredispy_ab86cd14995544df90f78a63ab7041a3/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-ymhn19ne
05:09:39           cwd: /tmp/pip-install-sypos2ry/mockredispy_ab86cd14995544df90f78a63ab7041a3/
05:09:39      Complete output (23 lines):
05:09:39      Couldn't find index page for 'nose' (maybe misspelled?)
05:09:39      No local packages or working download links found for nose
05:09:39      Traceback (most recent call last):
05:09:39        File "<string>", line 1, in <module>
05:09:39        File "/tmp/pip-install-sypos2ry/mockredispy_ab86cd14995544df90f78a63ab7041a3/setup.py", line 29, in <module>
05:09:39          'with_redis = mockredis.noseplugin:WithRedis'
05:09:39        File "/usr/lib/python3.5/distutils/core.py", line 108, in setup
05:09:39          _setup_distribution = dist = klass(attrs)
05:09:39        File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 317, in __init__
05:09:39          self.fetch_build_eggs(attrs['setup_requires'])
05:09:39        File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 372, in fetch_build_eggs
05:09:39          replace_conflicting=True,
05:09:39        File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 846, in resolve
05:09:39          dist = best[req.key] = env.best_match(req, ws, installer)
05:09:39        File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1118, in best_match
05:09:39          return self.obtain(req, installer)
05:09:39        File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1130, in obtain
05:09:39          return installer(requirement)
05:09:39        File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 440, in fetch_build_egg
05:09:39          return cmd.easy_install(req)
05:09:39        File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 693, in easy_install
05:09:39          raise DistutilsError(msg)
05:09:39      distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('nose')
05:09:39      ----------------------------------------

Signed-off-by: Guohan Lu <lguohan@gmail.com>
guxianghong pushed a commit to CentecNetworks/sonic-buildimage that referenced this issue Apr 22, 2021
…c-net#7257)

Fix sonic-net#7248

Issue is similiar to martinblech/xmltodict#47

The correct solution is to change mockredispy to move
nose from setup_requirement to test_requirement.

The quick workaround is to install nose explicitly.

fix build issue:

05:09:37    Downloading mockredispy-2.9.3.tar.gz (17 kB)
05:09:39  ?[91m    ERROR: Command errored out with exit status 1:
05:09:39       command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-sypos2ry/mockredispy_ab86cd14995544df90f78a63ab7041a3/setup.py'"'"'; __file__='"'"'/tmp/pip-install-sypos2ry/mockredispy_ab86cd14995544df90f78a63ab7041a3/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-ymhn19ne
05:09:39           cwd: /tmp/pip-install-sypos2ry/mockredispy_ab86cd14995544df90f78a63ab7041a3/
05:09:39      Complete output (23 lines):
05:09:39      Couldn't find index page for 'nose' (maybe misspelled?)
05:09:39      No local packages or working download links found for nose
05:09:39      Traceback (most recent call last):
05:09:39        File "<string>", line 1, in <module>
05:09:39        File "/tmp/pip-install-sypos2ry/mockredispy_ab86cd14995544df90f78a63ab7041a3/setup.py", line 29, in <module>
05:09:39          'with_redis = mockredis.noseplugin:WithRedis'
05:09:39        File "/usr/lib/python3.5/distutils/core.py", line 108, in setup
05:09:39          _setup_distribution = dist = klass(attrs)
05:09:39        File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 317, in __init__
05:09:39          self.fetch_build_eggs(attrs['setup_requires'])
05:09:39        File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 372, in fetch_build_eggs
05:09:39          replace_conflicting=True,
05:09:39        File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 846, in resolve
05:09:39          dist = best[req.key] = env.best_match(req, ws, installer)
05:09:39        File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1118, in best_match
05:09:39          return self.obtain(req, installer)
05:09:39        File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1130, in obtain
05:09:39          return installer(requirement)
05:09:39        File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 440, in fetch_build_egg
05:09:39          return cmd.easy_install(req)
05:09:39        File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 693, in easy_install
05:09:39          raise DistutilsError(msg)
05:09:39      distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('nose')
05:09:39      ----------------------------------------

Signed-off-by: Guohan Lu <lguohan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants