Is it not possible to install scrapy on repl?
JamesXin (15)

I tried installing scrapy with import scrapy, but it says something about a recursion error...pls help

You are viewing a single comment. View All
YonatanBentzur (0)

I found a hacky workaround that works ok for me in case it's useful for anyone. Instead of installing the dependencies via Poetry I'm using pip.

I added a requirements.txt file to the project and put Scrapy == 2.5.0 there as the only line. Then in my main.py file I have:

import os
os.system('pip install -r requirements.txt')

And in my .replit file I added run = "python -m main" so when I hit the run button it installs scrapy successfully. After that you can change your .replit file back to whatever you want and using scrapy should just work for the rest of the session.

I've been doing that for a while now and it's a bit annoying for sure but it works and better than nothing.
I hope that helps!