Skip to content
This repository was archived by the owner on May 30, 2020. It is now read-only.

"setuptools_scm" could not be found #322

Closed
ewdurbin opened this issue Aug 15, 2015 · 15 comments
Closed

"setuptools_scm" could not be found #322

ewdurbin opened this issue Aug 15, 2015 · 15 comments

Comments

@ewdurbin
Copy link
Member

Originally reported by: ali raza (Bitbucket: alirz, GitHub: alirz)


Collecting tmdb3 (from flexget)
  Downloading tmdb3-0.7.2.tar.gz
Collecting path.py (from flexget)
  Downloading path.py-7.6.tar.gz
    Complete output from command python setup.py egg_info:
    Download error on https://pypi.python.org/simple/setuptools_scm/: [SSL: CERTIFICATE_VERIFY_FAILED] unknown error (_ssl.c:590) -- Some packages may not be found!
    Download error on https://pypi.python.org/simple/setuptools-scm/: [SSL: CERTIFICATE_VERIFY_FAILED] unknown error (_ssl.c:590) -- Some packages may not be found!
    Couldn't find index page for 'setuptools_scm' (maybe misspelled?)
    Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] unknown error (_ssl.c:590) -- Some packages may not be found!
    No local packages or download links found for setuptools-scm
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-build-VwgXX3/path.py/setup.py", line 49, in <module>
        setuptools.setup(**setup_params)
      File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
        _setup_distribution = dist = klass(attrs)
      File "/usr/lib/python2.7/site-packages/setuptools-18.0.1-py2.7.egg/setuptools/dist.py", line 267, in __init__
      File "/usr/lib/python2.7/site-packages/setuptools-18.0.1-py2.7.egg/setuptools/dist.py", line 312, in fetch_build_eggs
      File "/usr/lib/python2.7/site-packages/setuptools-18.0.1-py2.7.egg/pkg_resources/__init__.py", line 836, in resolve
      File "/usr/lib/python2.7/site-packages/setuptools-18.0.1-py2.7.egg/pkg_resources/__init__.py", line 1081, in best_match
      File "/usr/lib/python2.7/site-packages/setuptools-18.0.1-py2.7.egg/pkg_resources/__init__.py", line 1093, in obtain
      File "/usr/lib/python2.7/site-packages/setuptools-18.0.1-py2.7.egg/setuptools/dist.py", line 378, in fetch_build_egg
      File "/usr/lib/python2.7/site-packages/setuptools-18.0.1-py2.7.egg/setuptools/command/easy_install.py", line 623, in easy_install
    distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('setuptools-scm')


Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-VwgXX3/path.py


@ewdurbin
Copy link
Member Author

ewdurbin commented Sep 7, 2015

Original comment by Patrick Kimber (Bitbucket: pkimber, GitHub: pkimber):


I did pip install setuptools_scm and it solved the problem.

@ewdurbin ewdurbin added major and removed bug labels Jun 18, 2016
@ulope
Copy link

ulope commented Jun 28, 2016

This bug also occurs when trying to install for example pdbpp.
As in the original report manually installing setuptools-scm fixes the problem.

It's however not reproducible with pip 8.1.1

So this looks like it's probably not PyPI's problem but instead another fallout from pip 8.1.2's package name normalization.

ulo@dhcp27 ~ ⊙ tmp-31a19272a1024fa7@3.5
○ python --version
Python 3.5.1

ulo@dhcp27 ~ ⊙ tmp-31a19272a1024fa7@3.5
○ pip list
pip (8.1.2)
setuptools (23.1.0)
wheel (0.29.0)

○ pip install pdbpp
Collecting pdbpp
  Using cached pdbpp-0.8.3.tar.gz
    Complete output from command python setup.py egg_info:
    Couldn't find index page for 'setuptools_scm' (maybe misspelled?)
    No local packages or download links found for setuptools_scm
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/w9/dw430b4150jgsh1_f2cx5c8r0000gp/T/pip-build-8iqxow8t/pdbpp/setup.py", line 79, in <module>
        'install_pth_hack': install_pth_hack,
      File "/Users/ulo/.pythonz/pythons/CPython-3.5.1/lib/python3.5/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/Users/ulo/Envs/tmp-31a19272a1024fa7/lib/python3.5/site-packages/setuptools/dist.py", line 269, in __init__
        self.fetch_build_eggs(attrs['setup_requires'])
      File "/Users/ulo/Envs/tmp-31a19272a1024fa7/lib/python3.5/site-packages/setuptools/dist.py", line 313, in fetch_build_eggs
        replace_conflicting=True,
      File "/Users/ulo/Envs/tmp-31a19272a1024fa7/lib/python3.5/site-packages/pkg_resources/__init__.py", line 826, in resolve
        dist = best[req.key] = env.best_match(req, ws, installer)
      File "/Users/ulo/Envs/tmp-31a19272a1024fa7/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1092, in best_match
        return self.obtain(req, installer)
      File "/Users/ulo/Envs/tmp-31a19272a1024fa7/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1104, in obtain
        return installer(requirement)
      File "/Users/ulo/Envs/tmp-31a19272a1024fa7/lib/python3.5/site-packages/setuptools/dist.py", line 380, in fetch_build_egg
        return cmd.easy_install(req)
      File "/Users/ulo/Envs/tmp-31a19272a1024fa7/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 658, in easy_install
        raise DistutilsError(msg)
    distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('setuptools_scm')

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/w9/dw430b4150jgsh1_f2cx5c8r0000gp/T/pip-build-8iqxow8t/pdbpp/

@exhuma
Copy link

exhuma commented Aug 25, 2016

I have run into the same issue when installing both pytest-xdist and can confirm that manually installing setuptools-scm first solves it.

My environment:

  • Ubuntu 14.04.3
  • Python 3.4.3
  • pip 8.1.2
  • Proxied connection via hostname: bbs-pylon.ipsw.dt.ept.lu (see TB below)

Steps to reproduce:

  • Create a new virtual environment: pyvenv-3.4 env
  • Try installing pytest: ./env/bin/pip install pytest-xdist
  • Error happens here:
Download error on https://pypi.python.org/simple/setuptools_scm/: hostname 'bbs-pylon.ipsw.dt.ept.lu' doesn't match either of 'www.python.org', 'docs.python.org', 'bugs.python.org', 'wiki.pytho n.org', 'hg.python.org', 'mail.python.org', 'pypi.python.org', 'packaging.python.org', 'login.python.org', 'discuss.python.org', 'us.pycon.org', 'pypi.io', 'docs.pypi.io', 'pypi.org', 'docs.pypi.or g', 'donate.pypi.org' -- Some packages may not be found!
Download error on https://pypi.python.org/simple/setuptools-scm/: hostname 'bbs-pylon.ipsw.dt.ept.lu' doesn't match either of 'www.python.org', 'docs.python.org', 'bugs.python.org', 'wiki.pytho n.org', 'hg.python.org', 'mail.python.org', 'pypi.python.org', 'packaging.python.org', 'login.python.org', 'discuss.python.org', 'us.pycon.org', 'pypi.io', 'docs.pypi.io', 'pypi.org', 'docs.pypi.or g', 'donate.pypi.org' -- Some packages may not be found!
Couldn't find index page for 'setuptools_scm' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: hostname 'bbs-pylon.ipsw.dt.ept.lu' doesn't match either of 'www.python.org', 'docs.python.org', 'bugs.python.org', 'wiki.python.org', 'hg.pyt hon.org', 'mail.python.org', 'pypi.python.org', 'packaging.python.org', 'login.python.org', 'discuss.python.org', 'us.pycon.org', 'pypi.io', 'docs.pypi.io', 'pypi.org', 'docs.pypi.org', 'donate.pyp i.org' -- Some packages may not be found!
No local packages or download links found for setuptools-scm
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-build-pg9ufddu/pytest-xdist/setup.py", line 37, in <module>
    'Programming Language :: Python :: 3',
  File "/usr/lib/python3.4/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/home/users/michel/tmp/env/lib/python3.4/site-packages/setuptools/dist.py", line 239, in __init__
    self.fetch_build_eggs(attrs.pop('setup_requires'))
  File "/home/users/michel/tmp/env/lib/python3.4/site-packages/setuptools/dist.py", line 264, in fetch_build_eggs
    replace_conflicting=True
  File "/home/users/michel/tmp/env/lib/python3.4/site-packages/pkg_resources.py", line 620, in resolve
    dist = best[req.key] = env.best_match(req, ws, installer)
  File "/home/users/michel/tmp/env/lib/python3.4/site-packages/pkg_resources.py", line 858, in best_match
    return self.obtain(req, installer) # try and download/install
  File "/home/users/michel/tmp/env/lib/python3.4/site-packages/pkg_resources.py", line 870, in obtain
    return installer(requirement)
  File "/home/users/michel/tmp/env/lib/python3.4/site-packages/setuptools/dist.py", line 314, in fetch_build_egg
    return cmd.easy_install(req)
  File "/home/users/michel/tmp/env/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 610, in easy_install
    raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('setuptools-scm')

Solved by using the following sequence:

  • Create a new virtual environment: pyvenv-3.4 env
  • Installing setuptools: ./env/bin/pip install setuptools-scm
  • Try installing pytest: ./env/bin/pip install pytest-xdist

@dstufft
Copy link
Member

dstufft commented Aug 25, 2016

Looks like you have some sort of proxy between you and PyPI that's preventing download.

@wsanchez
Copy link

I'm running into a similar problem with Python 3.6 on OS X:

[tool:~] wsanchez$ python3.6 -m virtualenv /tmp/t
Using base prefix '/Library/Frameworks/Python.framework/Versions/3.6'
New python executable in /tmp/t/bin/python3.6
Also creating executable in /tmp/t/bin/python
Installing setuptools, pip, wheel...done.
[tool:~] wsanchez$ /tmp/t/bin/pip install Twisted
Collecting Twisted
  Using cached Twisted-16.5.0.tar.bz2
    Complete output from command python setup.py egg_info:
    Download error on https://pypi.python.org/simple/incremental/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) -- Some packages may not be found!
    Couldn't find index page for 'incremental' (maybe misspelled?)
    Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) -- Some packages may not be found!
    No local packages or working download links found for incremental>=16.10.1
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/3q/m6cdbs6j6sl24dqmbhw1bpfr0000gp/T/pip-build-wvvcrbce/Twisted/setup.py", line 21, in <module>
        setuptools.setup(**_setup["getSetupArgs"]())
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/tmp/t/lib/python3.6/site-packages/setuptools/dist.py", line 315, in __init__
        self.fetch_build_eggs(attrs['setup_requires'])
      File "/tmp/t/lib/python3.6/site-packages/setuptools/dist.py", line 361, in fetch_build_eggs
        replace_conflicting=True,
      File "/tmp/t/lib/python3.6/site-packages/pkg_resources/__init__.py", line 850, in resolve
        dist = best[req.key] = env.best_match(req, ws, installer)
      File "/tmp/t/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1122, in best_match
        return self.obtain(req, installer)
      File "/tmp/t/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1134, in obtain
        return installer(requirement)
      File "/tmp/t/lib/python3.6/site-packages/setuptools/dist.py", line 429, in fetch_build_egg
        return cmd.easy_install(req)
      File "/tmp/t/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 659, in easy_install
        raise DistutilsError(msg)
    distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('incremental>=16.10.1')

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/3q/m6cdbs6j6sl24dqmbhw1bpfr0000gp/T/pip-build-wvvcrbce/Twisted/
[tool:~] wsanchez$ /tmp/t/bin/pip install incremental
Collecting incremental
  Using cached incremental-16.10.1-py2.py3-none-any.whl
Installing collected packages: incremental
Successfully installed incremental-16.10.1
[tool:~] wsanchez$ 

@wsanchez
Copy link

This works with Python 3.5, but not with 3.6, both from the python.org installers.
I don't think there are any proxies in play.

@dstufft
Copy link
Member

dstufft commented Nov 16, 2016

Does anything change if you install certifi?

Sent from my iPhone

On Nov 16, 2016, at 4:23 PM, Wilfredo Sánchez Vega notifications@github.com wrote:

This works with Python 3.5, but not with 3.6, both from the python.org installers.
I don't think there are any proxies in play.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

@wsanchez
Copy link

Yes, that works…

@wsanchez
Copy link

Looks like it's not enough to install it system-wide; needs to be in the venv, FWIW.

@dstufft
Copy link
Member

dstufft commented Nov 16, 2016

Did 3.5 link against system OpenSSL and 3.6 link against a bundled copy?

Sent from my iPhone

On Nov 16, 2016, at 4:55 PM, Wilfredo Sánchez Vega notifications@github.com wrote:

Looks like it's not enough to install it system-wide; needs to be in the venv, FWIW.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

@wsanchez
Copy link

Correct

@dstufft
Copy link
Member

dstufft commented Nov 16, 2016

So 3.5 is getting certificates from the OS and 3.6 is not. Pip itself works because we bundle our own certificates but setup_requires is handled by setuptools and it relies on the OS unless you install certifi.

Sent from my iPhone

On Nov 16, 2016, at 5:10 PM, Wilfredo Sánchez Vega notifications@github.com wrote:

Correct


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

@panol
Copy link

panol commented Apr 5, 2017

thanks a lot ,it work if I upgrade the pip to 8.1.2

@FedericoRessi
Copy link

This problem looks related to packages that uses setup_requires parameter in setup.py. I think this issue is related with this one: pytest-dev/pytest-xdist#136 (comment)

awallace-cray pushed a commit to awallace-cray/pychapel that referenced this issue Aug 21, 2017
This change fixes the build failure "[SSL: CERTIFICATE_VERIFY_FAILED]"
when pip tries to download setuptools_scm to satisfy a dependency of
pytest-xdist-1.20.0, which happened consitently on various Cray internal
SLES build slaves since Aug 09 (except on chap05, where the error
never happened)

Suggested by: pypi/legacy#322,
  search for: "I did pip install setuptools_scm and it solved the problem"
@di
Copy link
Member

di commented Apr 11, 2018

This is not a problem with PyPI.

@di di closed this as completed Apr 11, 2018
ulfalizer added a commit to zephyrproject-rtos/west that referenced this issue Sep 19, 2018
The self-update mechanism checks the West and manifest repositories in
west/ for upstream changes and rebases them to the latest version if any
are found.

'west fetch' and 'west pull' run a self-update before fetching any
project data. It probably makes sense to always work with the latest
version of West and the manifest there. The self-update can be
suppressed with --no-update.

There's also a 'west update' command for manually updating West and/or
the manifest.

West automatically restarts itself after a self-update, before running
any commands or parsing the manifest. This makes it safe to add a new
feature to West and immediately start using it in the manifest.

The restarting is done with a plain exec(3). Getting this to work
required a few changes:

 - West now uses absolute instead of relative imports, to make it
   possible to execute src/west/main.py directly. This also makes it a
   bit simpler to work on West. Relative imports seem to be discouraged
   when googling around a bit.

   __init__.py was removed from src/west. West is more of an application
   than a package now (though it uses some packages internally).

 - The internal 'cmd' package was renamed to 'commands', to avoid
   clashing with a module in the Python standard library.

   'runner' was renamed to 'runners' as well, for consistency.

Using exec(3) also allowed the argv handling to be simplified a bit.

The tests now have to be run from the West repository root with
'PYTHONPATH=src/west pytest'. Maybe this could be improved. The West
module and packages have to get into sys.path somehow at least.

__init__.py was removed from the test directories as well. Don't think
having the tests in a package helps now.

A build fix and four unrelated changes are included as well:

 - setuptools-scm was added to test_requirements.txt to work around an
   issue on Python 3.4 (not sure why it didn't appear before):

     distutils.errors.DistutilsError: Could not find suitable
     distribution for Requirement.parse('setuptools-scm>=1.15.0')

   See pypi/legacy#322 and
   pytest-dev/pytest-xdist#136. I suspect the
   issue is related to setup_requires= using easy_install.

 - args.zephyr_base is no longer set to ZEPHYR_BASE, just the other way
   around. args.zephyr_base is currently unused except for setting
   ZEPHYR_BASE. I think it might be cleaner to add a new variable
   instead of directly modifying 'args' if the ZEPHYR_BASE value is
   needed elsewhere later.

 - WEST_TOPDIR was renamed to WEST_MARKER. The old name made me think
   that it was the path to the directory containing west/.

 - Project-related command-line arguments that are only used by a single
   command are now defined together with the command that uses them.

 - A bug was fixed in the bootstrapper's find_west_topdir(). The 'start'
   argument was being ignored.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
ulfalizer added a commit to zephyrproject-rtos/west that referenced this issue Sep 21, 2018
Add setuptools-scm to test_requirements.txt to work around an issue on
Python 3.4:

  distutils.errors.DistutilsError: Could not find suitable
  distribution for Requirement.parse('setuptools-scm>=1.15.0')

Not sure why it didn't appear before. Maybe something in CI changed.

See pypi/legacy#322 and
pytest-dev/pytest-xdist#136. I suspect the
issue is related to setup_requires= using easy_install.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
mbolivar pushed a commit to zephyrproject-rtos/west that referenced this issue Sep 21, 2018
Add setuptools-scm to test_requirements.txt to work around an issue on
Python 3.4:

  distutils.errors.DistutilsError: Could not find suitable
  distribution for Requirement.parse('setuptools-scm>=1.15.0')

Not sure why it didn't appear before. Maybe something in CI changed.

See pypi/legacy#322 and
pytest-dev/pytest-xdist#136. I suspect the
issue is related to setup_requires= using easy_install.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants