X Tutup
Skip to content

Recommendation to install packages for various OS #6546

@AbdealiLoKo

Description

@AbdealiLoKo

In setup.py L216 there is an error message which says which packages were not found while installing.
Would it be possible to suggest methods of installing these packages in some common Operating Systems ? Something like:

# A list of apt, brew, etc packages for various OS
# Example using freetype
pkg = 'freetype'
apt_pkg = 'libfreetype6-dev'
brew_pkg  'freetype'
win_pkg_url = 'http://gnuwin32.sourceforge.net/packages/freetype.htm'

if platform.system() == 'win32':
    print('Please check {0} for instructions to install {1}'
           .format(win_pkg_url, pkg))
elif platform.system() == 'darwin':
    print('Try installing {0} with `brew install {1}`'
          .format(pkg, brew_pkg))
elif platform.system() == 'Linux':
    distname, _, __ = platform.linux_distribution()
    if distname.lower() in ('ubuntu', 'debian'):
        print('Try installing {0} with `apt-get install {1}`'
              .format(pkg, apt_pkg))

This would be needed only for the required packages for which local copies are not provided.

A user found the error message - https://justpaste.it/v0if which was a bit confusing as it didn't suggest what to do. It'd be nice to give more helpful messages for people just starting python:

  • Matplotlib version - 2.0.0b1
  • Python version - 2.7.6
  • Platform - Linux, Kubuntu 14.04.1
  • Installation source - Using pip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup