Buildout not working / Couldn't find index page for / Couldn't find a distribution / Disabling non HTTPS access to APIs on PyPI

Oh, for those who cannot reprocuce the bootstrap error locally, try using a virtualenv without setuptools, otherwise the failing part gets ignored:

  virtualenv --no-setuptools --no-pip --no-wheel --python=python2.7 .

Using your commit in https://github.com/plone/buildout.coredev/commit/316da91ced540273bc161987b43423955ee5d8c7:

git clone https://github.com/collective/minimalplone4 && cd minimalplone4 && wget https://raw.githubusercontent.com/plone/buildout.coredev/316da91ced540273bc161987b43423955ee5d8c7/bootstrap.py && python bootstrap.py && mkdir eggs && bin/buildout buildout:eggs-directory="eggs" buildout:download-cache="eggs" versions:zc.buildout=1.7.1

Gives the same error:

Couldn't find index page for 'plone.recipe.zope2instance' (maybe misspelled?)
Getting distribution for 'plone.recipe.zope2instance==4.3'.
While:
  Installing.
  Getting section instance.
  Initializing section instance.
  Installing recipe plone.recipe.zope2instance.
  Getting distribution for 'plone.recipe.zope2instance==4.3'.
Error: Couldn't find a distribution for 'plone.recipe.zope2instance==4.3'.

But we'll try to reproduce like you said in Buildout not working / Couldn't find index page for / Couldn't find a distribution / Disabling non HTTPS access to APIs on PyPI.

1 Like

If you already has cached eggs, there's no error, that's why we're using mkdir eggs && bin/buildout buildout:eggs-directory="eggs" buildout:download-cache="eggs", to force it to always download the eggs.

@mauritsvanrees using the virtualenv and different bootstrap (for buildout 1 and 2) we still get the same error if zc.buildout is pinned to any version different from 2.9.5.

@idgserpro: I need the updated bootstrap.py because otherwise the bootstrap call gives an error. After that finishes correctly, and I ignore the eggs cache, I get the same error as you. It works for me when I add this to your last command:

buildout:index=https://pypi.python.org/simple/

This topic is now a banner. It will appear at the top of every page until it is dismissed by the user.

This topic is no longer a banner. It will no longer appear at the top of every page.

I confirm that this solution works for me. I replaced my bootstrap.py with the one at:

https://bootstrap.pypa.io/bootstrap-buildout.py

and added the line in my default.cfg:

index=https://pypi.python.org/simple/

Putting the above line in the [buildout] section of buildout.cfg should work as well.

2 Likes

There was a typo in my buildout.cfg. This doesn't work:

index = 
    https://pypi.python.org/simple/

But this does:

index = https://pypi.python.org/simple/

So, the command

git clone https://github.com/collective/minimalplone4 && cd minimalplone4 && wget https://bootstrap.pypa.io/bootstrap-buildout.py && python bootstrap-buildout.py && mkdir eggs && bin/buildout buildout:eggs-directory="eggs" buildout:download-cache="eggs" buildout:index=https://pypi.python.org/simple/ versions:zc.buildout=1.7.1

Now runs successfully. I know it doesn't make sense to have a multiline index (since it expects just one value) but it's funny that didn't work even having just one url.

1 Like

@mauritsvanrees we need to update zc.buildout in coredev for 4.3.x or add this index.

I have added the index in coredev 4.3.

2 Likes

Specifying the --find-links argument to buildout might also help, in situations where other solutions aren't helpful.
http://docs.buildout.org/en/latest/reference.html?highlight=--find-links

I confirm that adding the 'index=' line in [buildout] section of my buildout.cfg fixes this problem for me.
Plone 5.0.7 fresh install using unified installer on Debian 9 server with installer generated buildout.cfg.
I did not do anything else with any files such as bootstrap.py or others mentioned here (messing with pieces of buildout at that level is way over my head).
I'd just started trying to install add-ons to this fresh install via the usual means and kept getting the:

Couldn't find index page for product-xyz (maybe misspelled?)
...
Error: Couldn't find a distribution for product-xyz

I found this thread by sheer luck, after a fruitless hour+ searching & trying to solve this - because the thread subject/title has nothing to do with the errors one gets at the buildout user level and is most likely to be searching for help with.
Is it possible to change the title of this thread to make it more findable vs. the actual error msg?

Sure, what title do you suggest? "buildout not working" seems pretty clear :slight_smile: but ok

Including the start of the two main error message is great, thanks.
That gives a search for the actual error message something to find.
The last part of the title is not search-useful, nobody will search on that if they get this error. If they know it's about the http/https change on pypi they likely know the solution already.
Just some tips on issue titles from 7+ years software QA/test experience...

Hey folks,

I had no luck with your workaround.
Im running Plone 3.2.3 on python 2.4.5

setuptools = 0.6c9
zc.buildout = 1.1.2

I changed the URL http://pypi.python.org/simple/ to https but it seems that python is not able to communicate over https:
Download error: unknown url type: https -- Some packages may not be found!

Can anybody provide a solution to the unified installer for that version?

@philurlaub The UnifiedInstaller python installation comes with no ssl support: you need to use another compiled python with that support.

If this isn't a production installation, you can use https://github.com/saghul/pythonz to install another python 2.4 and use it.

If you used ZopeSkel to create your packages, you may come across errors like:

SyntaxError: invalid syntax on line 23: with open(file,'w') as fileh:

This happens because you're using a python 2.4 and downloading newer versions of PasteScript and Paste: you can do

Python-2.4/bin/easy_install PasteDeploy==1.3.1 && Python-2.4/bin/easy_install Paste==1.6 && Python-2.4/bin/easy_install PasteScript==1.6

To avoid these problems.

This is the one I've heard about GitHub - collective/buildout.python: Buildout all the Pythons

FYI - I had the following issue ('DistributionNotFound' when running buildout), and the command in @idgserpro's post to force the downloading of the eggs fixed it :ok_hand::pray:

mkdir eggs && bin/buildout buildout:eggs-directory="eggs" buildout:download-cache="eggs"

Running each of the two commands alone, one after the other, sometimes seems to work better, for whatever reason.