Skip to content

[Bug]: PEX warns about missing setuptools from install_requires in matplotlib #23307

@georgipopovhs

Description

@georgipopovhs

Bug summary

Using matplotlib with PEX warns about using namespace packages but missing setuptools from install_requires:

PEXWarning: The `pkg_resources` package was loaded from a pex vendored version when declaring namespace packages defined by:

1. matplotlib==3.5.2 namespace packages:
  mpl_toolkits

These distributions should fix their `install_requires` to include `setuptools`

This error is triggering the internal monitoring system (sentry) at our company.
matplotlib is installed as catboost dependency.
Interested in if this is a legit warning, and whether you would be open to including setuptools?

Code for reproduction

$ pip install pex
$ pex --version
2.1.92
$ pex matplotlib==3.5.2
/private/var/folders/t0/zb49xf010cq4mqzwwxw8f31h0000gp/T/tmpbwxjl1xt/.bootstrap/pex/environment.py:657: PEXWarning: The `pkg_resources` package was loaded from a pex vendored version when declaring namespace packages defined by:

1. matplotlib==3.5.2 namespace packages:
  mpl_toolkits

These distributions should fix their `install_requires` to include `setuptools`
  "should fix their `install_requires` to include `setuptools`".format(dists=dists)
Python 3.7.9 (default, Mar 12 2021, 20:11:13)
[Clang 12.0.0 (clang-1200.0.32.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>>

Actual outcome

Warning about missing setuptools from install_requires.

Expected outcome

No warning.

Additional information

No response

Operating system

Darwin Georgi.popov-6MNMD6R-hypersci 20.6.0 Darwin Kernel Version 20.6.0: Tue Oct 12 18:33:42 PDT 2021; root:xnu-7195.141.8~1/RELEASE_X86_64 x86_64

Matplotlib Version

3.5.2

Matplotlib Backend

'MacOSX'

Python version

3.7.9

Jupyter version

n/a

Installation

pip

Metadata

Metadata

Assignees

No one assigned

    Labels

    BuildGood first issueOpen a pull request against these issues if there are no active ones!

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions