Skip to content

Explicitly tell install_requires and avoid use pip internals #56

Open
@michelts

Description

@michelts

Hi @clemfromspace

I'm trying to install scrapy-selenium using the setup.py file (to enjoy the possibility of use a remote selenium operation), but it fails if I have pip version greater than 19.x.

Traceback (most recent call last):
  File "setup.py", line 5, in <module>
    from pip.download import PipSession
ModuleNotFoundError: No module named 'pip.download'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "setup.py", line 10, in <module>
    from pip._internal.download import PipSession
ModuleNotFoundError: No module named 'pip._internal.download'

This is because you are relying on pip internals to specify the requirements for the project.

I'm not an experienced packer :), but I found an article that recommends to use install_requires and test_requires directly as list rather than using requirements files.

If we use list in the setup.py file, we won't need to use pip internals nor need to update the setup.py file always pip changes.

Do you agree hardcoding the versions in the setup.py file?

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions