Anyhow, you run pip install scrapy and you run into an error:
Scrapy failing to pip install in Windows |
The error here is one of dependencies of Scrapy which is Twisted. Fortunately this is fixable.
The first thing we're going to do is download the "binary" wheel file for Twisted. There's a trick here though, YOU MUST DOWNLOAD THE CORRECT ONE THAT MATCHES YOUR PYTHON VERSION. So if you are on Python 3.6, you're looking for something that reads like Twisted-18.9.0-cp36-cp36m-win32.whl; if Python 3.7 then you're looking for something with cp37-cp37m. You get the idea.
The 32-bit or 64-bit probably also matters but I didn't test it.
Once you have that file downloaded somewhere, you can then do a pip install
Try installing Scrapy again and you should be good to go.
As an added bonus, this seems to fix other Python packages in Windows that require the Visual Studio Windows C++ SDK like the mysql-python.
Tip for Pipenv users:
1. pipenv shell
2. pip install
3. pipenv sync