Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Oct 2, 2018. It is now read-only.

Fix for issue #100 #101

Closed
wants to merge 1 commit into from
Closed

Fix for issue #100 #101

wants to merge 1 commit into from

Conversation

cread
Copy link

@cread cread commented May 16, 2014

I also had issue #100 on Ubuntu 12.04 and 14.04 systems when I upgraded to the latest version of the Python cookbook.

I tracked it down to get-pip.py refusing to install pip on my systems unless the python-setuptools package was installed first. If you get that fixed, then later on in the package it will upgrade setuptools for you.

I have this fix running successfully on my systems now.

@coderanger
Copy link
Member

Hmm, can you paste the error you get from get-pip? pip as of 1.5 no longer depends on setuptools itself, it should only be needed if you are installing sdists instead of wheels.

@cread
Copy link
Author

cread commented May 23, 2014

Here is the output from pip.log when recipe[[email protected]] fails on a minimal Ubuntu 14.04 installation. I get the same error on Ubuntu 12.04 too.

get-pip.py run on Fri May 23 10:29:20 2014
Downloading/unpacking pip
  Getting page http://pypi-mirror/pip/
  URLs to search for versions for pip:
  * http://pypi-mirror/pip/
  http://pypi-mirror/pip/ uses an insecure transport scheme (http). Consider using https if pypi-mirror has it available
  * http://pypi/simple/pip/
  http://pypi/simple/pip/ uses an insecure transport scheme (http). Consider using https if pypi has it available
  Analyzing links from page http://pypi-mirror/pip/
    Found link http://pypi-mirror/pip/pip-0.2.1.tar.gz#md5=d2af655c1a87e03799442d045c1d6743 (from http://pypi-mirror/pip/), version: 0.2.1
    Found link http://pypi-mirror/pip/pip-0.2.tar.gz#md5=9eda07c8be7105aa774c7eb51c023294 (from http://pypi-mirror/pip/), version: 0.2
    Found link http://pypi-mirror/pip/pip-0.3.1.tar.gz#md5=78102ddbb040a183dd361b5d432cdf88 (from http://pypi-mirror/pip/), version: 0.3.1
    Found link http://pypi-mirror/pip/pip-0.3.tar.gz#md5=8fccb5b49c6377cbfb1949ccd7be43b3 (from http://pypi-mirror/pip/), version: 0.3
    Found link http://pypi-mirror/pip/pip-0.4.tar.gz#md5=b45714d04f8fd38fe8e3d4c7600b91a2 (from http://pypi-mirror/pip/), version: 0.4
    Found link http://pypi-mirror/pip/pip-0.5.1.tar.gz#md5=d4bdaa5f5f5bf8c6263ace75a0882232 (from http://pypi-mirror/pip/), version: 0.5.1
    Found link http://pypi-mirror/pip/pip-0.5.tar.gz#md5=63eed8673e40628534cc0aa9c98e8f3d (from http://pypi-mirror/pip/), version: 0.5
    Found link http://pypi-mirror/pip/pip-0.6.1.tar.gz#md5=7560e3055c66afb99ac4a7892389a237 (from http://pypi-mirror/pip/), version: 0.6.1
    Found link http://pypi-mirror/pip/pip-0.6.2.tar.gz#md5=9a43e0a2ce8833069f41c347932bdb25 (from http://pypi-mirror/pip/), version: 0.6.2
    Found link http://pypi-mirror/pip/pip-0.6.3.tar.gz#md5=0602fa9179cfaa98e41565d4a581d98c (from http://pypi-mirror/pip/), version: 0.6.3
    Found link http://pypi-mirror/pip/pip-0.6.tar.gz#md5=083ff408ca5314cf0561ff79a048cd9a (from http://pypi-mirror/pip/), version: 0.6
    Found link http://pypi-mirror/pip/pip-0.7.1.tar.gz#md5=420c83ad67bdcb542f772eb64392cce6 (from http://pypi-mirror/pip/), version: 0.7.1
    Found link http://pypi-mirror/pip/pip-0.7.2.tar.gz#md5=cfe73090aaa0d3b0c104179a627859d1 (from http://pypi-mirror/pip/), version: 0.7.2
    Found link http://pypi-mirror/pip/pip-0.7.tar.gz#md5=8d4b4f7266fe0808569182e6832d74ac (from http://pypi-mirror/pip/), version: 0.7
    Found link http://pypi-mirror/pip/pip-0.8.1.tar.gz#md5=5d40614774781b118dd3f10c0d038cbc (from http://pypi-mirror/pip/), version: 0.8.1
    Found link http://pypi-mirror/pip/pip-0.8.2.tar.gz#md5=df1eca0abe7643d92b5222240bed15f6 (from http://pypi-mirror/pip/), version: 0.8.2
    Found link http://pypi-mirror/pip/pip-0.8.3.tar.gz#md5=0603337a81f83df2b1d2f1151565efac (from http://pypi-mirror/pip/), version: 0.8.3
    Found link http://pypi-mirror/pip/pip-0.8.tar.gz#md5=468d9adc309f33ad51cee38f0d455429 (from http://pypi-mirror/pip/), version: 0.8
    Found link http://pypi-mirror/pip/pip-1.0.1.tar.gz#md5=28dcc70225e5bf925532abc5b087a94b (from http://pypi-mirror/pip/), version: 1.0.1
    Found link http://pypi-mirror/pip/pip-1.0.2.tar.gz#md5=47ec6ff3f6d962696fe08d4c8264ad49 (from http://pypi-mirror/pip/), version: 1.0.2
    Found link http://pypi-mirror/pip/pip-1.0.tar.gz#md5=327fc4a03df189506966e15021730550 (from http://pypi-mirror/pip/), version: 1.0
    Found link http://pypi-mirror/pip/pip-1.1.tar.gz#md5=62a9f08dd5dc69d76734568a6c040508 (from http://pypi-mirror/pip/), version: 1.1
    Found link http://pypi-mirror/pip/pip-1.2.1.tar.gz#md5=db8a6d8a4564d3dc7f337ebed67b1a85 (from http://pypi-mirror/pip/), version: 1.2.1
    Found link http://pypi-mirror/pip/pip-1.2.tar.gz#md5=99e44d1d7f88b182459e7c19c45aee9f (from http://pypi-mirror/pip/), version: 1.2
    Found link http://pypi-mirror/pip/pip-1.3.1.tar.gz#md5=cbb27a191cebc58997c4da8513863153 (from http://pypi-mirror/pip/), version: 1.3.1
    Found link http://pypi-mirror/pip/pip-1.3.tar.gz#md5=918559b784e2aca9559d498050bb86e7 (from http://pypi-mirror/pip/), version: 1.3
    Found link http://pypi-mirror/pip/pip-1.4.1.tar.gz#md5=6afbb46aeb48abac658d4df742bff714 (from http://pypi-mirror/pip/), version: 1.4.1
    Found link http://pypi-mirror/pip/pip-1.4.tar.gz#md5=ca790be30004937987767eac42cfa44a (from http://pypi-mirror/pip/), version: 1.4
    Found link http://pypi-mirror/pip/pip-1.5.1.tar.gz#md5=4678c2ae5cce4e9234c3923d7dcb32f0 (from http://pypi-mirror/pip/), version: 1.5.1
    Found link http://pypi-mirror/pip/pip-1.5.2.tar.gz#md5=5da30919f732d68b1c666e484e7676f5 (from http://pypi-mirror/pip/), version: 1.5.2
    Found link http://pypi-mirror/pip/pip-1.5.3.tar.gz#md5=78871c5f84ea5fca61900347ce7864ad (from http://pypi-mirror/pip/), version: 1.5.3
    Found link http://pypi-mirror/pip/pip-1.5.4.tar.gz#md5=834b2904f92d46aaa333267fb1c922bb (from http://pypi-mirror/pip/), version: 1.5.4
    Found link http://pypi-mirror/pip/pip-1.5.5.tar.gz#md5=7520581ba0687dec1ce85bd15496537b (from http://pypi-mirror/pip/), version: 1.5.5
    Found link http://pypi-mirror/pip/pip-1.5.6.tar.gz#md5=01026f87978932060cc86c1dc527903e (from http://pypi-mirror/pip/), version: 1.5.6
    Found link http://pypi-mirror/pip/pip-1.5.tar.gz#md5=6969b8a8adc4c7f7c5eb1707118f0686 (from http://pypi-mirror/pip/), version: 1.5
  Getting page http://pypi/simple/pip/
  Could not fetch URL http://pypi/simple/pip/: 404 Client Error: Not Found
  Will skip URL http://pypi/simple/pip/ when looking for download links for pip
  Using version 1.5.6 (newest of versions: 1.5.6, 1.5.5, 1.5.4, 1.5.3, 1.5.2, 1.5.1, 1.5, 1.4.1, 1.4, 1.3.1, 1.3, 1.2.1, 1.2, 1.1, 1.0.2, 1.0.1, 1.0, 0.8.3, 0.8.2, 0.8.1, 0.8, 0.7.2, 0.7.1, 0.7, 0.6.3, 0.6.2, 0.6.1, 0.6, 0.5.1, 0.5, 0.4, 0.3.1, 0.3, 0.2.1, 0.2)
  Downloading from URL http://pypi-mirror/pip/pip-1.5.6.tar.gz#md5=01026f87978932060cc86c1dc527903e (from http://pypi-mirror/pip/)
Cleaning up...
  Removing temporary dir /tmp/pip_build_root...
setuptools must be installed to install from a source distribution
Exception information:
Traceback (most recent call last):
  File "/tmp/unpacker-vHcy4K-scratchdir/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/tmp/unpacker-vHcy4K-scratchdir/pip/commands/install.py", line 274, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/tmp/unpacker-vHcy4K-scratchdir/pip/req.py", line 1215, in prepare_files
    req_to_install.run_egg_info()
  File "/tmp/unpacker-vHcy4K-scratchdir/pip/req.py", line 288, in run_egg_info
    logger.notify('Running setup.py (path:%s) egg_info for package %s' % (self.setup_py, self.name))
  File "/tmp/unpacker-vHcy4K-scratchdir/pip/req.py", line 269, in setup_py
    "setuptools must be installed to install from a source "
InstallationError: setuptools must be installed to install from a source distribution

Adding this patch fixes this on both platforms.

@naphthalene
Copy link

We had to write some ugly hacks to get around this issue. Any chance this can be merged @coderanger? The logic is sound @cread

@coderanger
Copy link
Member

No, this is directly in contradiction with other code in the cookbook (also I don't want to depend on OS packages for setuptools). Happy to see more debugging data over on #100 though.

@coderanger coderanger closed this Jun 30, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants