votes up 2

Multiple .dist-info directories found in (param1)

Package:
Exception Class:
WheelError

Raise code

""" 
    """
    # Find the .dist-info directory
    dist_info_dirs = [fn for fn in os.listdir(directory)
                      if os.path.isdir(os.path.join(directory, fn)) and DIST_INFO_RE.match(fn)]
    if len(dist_info_dirs) > 1:
        raise WheelError('Multiple .dist-info directories found in {}'.format(directory))
    elif not dist_info_dirs:
        raise WheelError('No .dist-info directories found in {}'.format(directory))

    # Determine the target wheel filename
    dist_info_dir = dist_info_dirs[0]
😲  Walkingbet is Android app that pays you real bitcoins for a walking. Withdrawable real money bonus is available now, hurry up! 🚶

Ways to fix

votes up 1 votes down

Short answer: you have more than one directory with a name that ends with .dist-info directories in the folder specified in an exception because you tried to use different pip/python version to install same package.

Imagine you see:

Multiple .dist-info directories found in <folder from exception>

To check it run

ls <folder from exception>

You will see two or more directories kinda xxx-yyy.dist-info. To fix just remove manually all .dist-info directories:

rm -r <folder from exception>/*.dist-info

Now try again.

Longer answer

When you or pip is building a wheel it needs a source egg directory, to test understand it better we recommend creating super simple python egg or just read that hint carefully.

As you can see normally source egg directory should have only one folder which ends with .dist-info.

However, in your case, you somehow got a second .dist-info in your egg directory.

Often it happens because you tried to run it with a different python number, and the second directory is for you different "I accidentally confused the version when executed pip etc".

Thing is that wheel builder lists all directories and finds once which follow the regexp:

^(?P<namever>(?P<name>.+?)-(?P<ver>\d.*?))\.dist-info$

So you just can clean up such dirs so egg will be recreated and will work with your package

May 08, 2021 ivan answer
ivan 110

Add a possible fix

Please authorize to post fix