0

I want to use mypy-boto3 for type annotations in a project installed with setup.py. Unfortunately this usedhs extra requires so you need to install it like so:

pip install mypy-boto3[s3]

(as documented here).

This doesn't seem to work in install_requires, however:

    install_requires=[
        "mypy-boto3[s3]",
    ],

...
>>> import  mypy_boto3_s3
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'mypy_boto3_s3'

Is there a way to specify the extras_require for a package installed by install_requires (note that I don't want to specify the extras_require for my package, I want to use extras_requires in a package I depend upon).

Att Righ
  • 1,439
  • 1
  • 16
  • 29

0 Answers0