scrapy-cloudflare-middleware icon indicating copy to clipboard operation
scrapy-cloudflare-middleware copied to clipboard

Error while installing package

Open mhsiddiqui opened this issue 6 years ago • 3 comments

$ pip install scrapy_cloudflare_middleware

Collecting scrapy_cloudflare_middleware
  Using cached https://files.pythonhosted.org/packages/40/a9/318f4d04af28560ec676989ba419d4e43e5908a90fd5bd6a236b9ec5e178/scrapy_cloudflare_middleware-0.0.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-I2lEg1/scrapy-cloudflare-middleware/setup.py", line 4, in <module>
        from pip.download import PipSession
    ImportError: No module named download
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-I2lEg1/scrapy-cloudflare-middleware/

mhsiddiqui avatar Oct 13 '18 19:10 mhsiddiqui

Can you please also tell us which versions and software you use:

  • OS + OS Version
  • Python Version
  • Pip Version

ihgalis avatar Oct 14 '18 08:10 ihgalis

Ubuntu 18.04 Python 2.7 pip 10.0.1

mhsiddiqui avatar Oct 15 '18 05:10 mhsiddiqui

I was able to resolve this by cloning the repo, then editing setup.py so that the import section looks like the following:

from setuptools import setup, find_packages from pip._internal.download import PipSession from pip._internal.req import parse_requirements

Then, using the command line, install the module using the following:

pip install -e .

It should install correctly now.

I'll submit a pull request with the correction.

Hope this helps!

mark5280 avatar Dec 15 '18 03:12 mark5280