Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while installing package #2

Open
mhsiddiqui opened this issue Oct 13, 2018 · 3 comments
Open

Error while installing package #2

mhsiddiqui opened this issue Oct 13, 2018 · 3 comments

Comments

@mhsiddiqui
Copy link

$ 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/
@ihgalis
Copy link

ihgalis commented Oct 14, 2018

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

  • OS + OS Version
  • Python Version
  • Pip Version

@mhsiddiqui
Copy link
Author

Ubuntu 18.04
Python 2.7
pip 10.0.1

@mark5280
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants