1

Please read before marking as duplicate: I am trying to install scrapy with pip but it gives me following error:

Command "python setup.py egg_info" failed with error code 1 in C:\Users\Admin\AppData\Local\Temp\pip-install-qrebbk1j\cffi\

I have tried every solution available on stackoverflow and nothing solves my error. Yes,my pip is updated and setup_tools is also updated. Everything was working fine and I did install other packages today itself but when I tried to install scrapy it gave this error and I have no idea what else i can do I tried everything I could do. I followed every step on this answer However, nothing works, please help.

Eternal
  • 928
  • 9
  • 22
  • when i simply install scrapy it gives above mentioned errors and when I updated things mentioned in answer they all were updated successfully and whenever I tried to install scrapy it gave the same error in every method. – Eternal Feb 27 '19 at 11:03
  • I see that you're trying to install a package to a local version of python. The problem here seems to be a permission problem. Would you consider pyenv to manage python environments? Also, try to run the command line as administrator. – Rafael Almeida Feb 27 '19 at 12:37
  • I did what you suggested and now I am getting different error. error: [WinError 3] The system cannot find the path specified: 'C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v8.1\\lib' – Eternal Feb 28 '19 at 05:43

1 Answers1

0

I have finally resolved the issue, as it happens the package I was trying to install needs windows sdk 8.1 which got installed after installing the sdk.

However now this also installs a package called twisted for dependency I guess, which has some components written in C thus it needs a C compiler. which gave me this error

error: Setup script exited with error: command 'cl.exe' failed: No such file or directory

Hence, I could download a vs c++ compiler and it would solve the error. But a simpler solution would be downloading an already compiled version of the required packages which are mostly available on this site for windows. Although this is not official distribution so use it at your own risk.

Eternal
  • 928
  • 9
  • 22