Skip to content


Subversion checkout URL

You can clone with
Download ZIP


pip wrongly selects when installing pygame on Linux #57

vbabiy opened this Issue · 9 comments

4 participants



The most annoying part about it is that there is no way to force it to install a specific file that I know is the correct one.


zyv@mypride:~/Desktop$ pip install pygame
Downloading/unpacking pygame
  Downloading (10.8Mb): 10.8Mb downloaded
  Running egg_info for package pygame
    Traceback (most recent call last):
      File "<string>", line 14, in <module>
    IOError: [Errno 2] No such file or directory: '/home/zyv/Desktop/build/pygame/'
    Complete output from command python egg_info:
    Traceback (most recent call last):

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

IOError: [Errno 2] No such file or directory: '/home/zyv/Desktop/build/pygame/'

Command python egg_info failed with error code 1
Storing complete log in /home/zyv/.pip/pip.log


Well, while a valid bug, there is a workaround you can do:

pip install

(or whatever file you know is the correct one).

Original Comment By: Jannis Leidel


We are tracking this issue on the pygame issue tracker here:

Any ideas on why this is happening?


The problem comes from those files on your download page ( : 10.3MB 10.3MB 10.3MB

basically the PackageFinder of pip is crawling your page for links and *.tar, *.zip etc... files representing python packages, and two key facts happen :

  • those files are zip files, not any other plateform dependent files like "mpkg" or "dmg";
  • and they are named just like python packages.

So the package finder treat them as releases, and parse their versions. So on any machine you'll end up with the following "sorted" list :

 Using version 1.9.2pre-py2.7-macosx10.7.mpkg 
 (newest of versions: 1.9.2pre-py2.7-macosx10.7.mpkg, 1.9.2pre-py2.6-macosx10.6.mpkg, 
      1.9.1release-py2.6-macosx10.5, 1.9.1release-py2.5-macosx10.5, 
      1.9.1release-py2.4-macosx10.5, 1.9.1release, 1.9.1release, 
      1.9.0release, 1.8.1release, 1.8.0release, 1.8.0-deps-src, 1.7.1release, 1.6.2,...)

So the possible fix is simple, simply make available for download the dmg/mpkg files or rename them so that they don't appear like Python packages anymore.




Not sure pip can fix this without backwards-incompatible changes to the finder algorithm. Closing.

@carljm carljm closed this

@ssaboum thanks.

@carljm I don't think .zip files have a mime type of 'python source package' ;)

We're going to have to change something on the pygame side to get pip working, because of old versions of pip anyway. I think uploading a newer source file should fix it too.


Note, that the 'macosx10.x' part of the file name should give it away as a py2app generated .zip file.

At one point in time .zip files were deemed better for distribution over .dmg files (I'm not sure this is still the case though).

So the algorithm could be updated to check for the py2app specific file names, where the filename also contains 'macosx%VER%' it is likely to be a mac binary installer.

@carljm carljm reopened this

We could add a special case in the finder to discard any files containing "macosx10.", I suppose. Open to pull request.



I can't clone pip at the moment (bad internet connection), and I can't even test it because pip isn't working for me.

In pip/ around line 289...

            if ext not in ('.tar.gz', '.tar.bz2', '.tar', '.tgz', '.zip'):
                if link not in self.logged_links:
                    logger.debug('Skipping link %s; unknown archive format: %s' % (link, ext))
                return []
            if "macosx10" in link.path and ext in ('.zip'):
                if link not in self.logged_links:
                    logger.debug('Skipping link %s; because it is a macosx10 .zip filename which is probably a binary' % (link))
                return []
@illume illume referenced this issue from a commit in illume/pip
@illume illume For issue #57 pip wrongly selects a macosx binary .zip file
Instead of a source file it downloads a binary macosx .zip file
which contains a binary installer.

Fixed in c8d11de - thanks for the patch!

@carljm carljm closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.