scrapy-cloudflare-middleware
scrapy-cloudflare-middleware copied to clipboard
Error while installing package
$ 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/
Can you please also tell us which versions and software you use:
- OS + OS Version
- Python Version
- Pip Version
Ubuntu 18.04 Python 2.7 pip 10.0.1
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!