scrapy-selenium icon indicating copy to clipboard operation
scrapy-selenium copied to clipboard

Explicitly tell install_requires and avoid use pip internals

Open michelts opened this issue 4 years ago • 0 comments

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.

michelts avatar Mar 03 '20 14:03 michelts