'Can't use scrapy on Apple M1 chip

I have a basic code that aim to scrap 'quotes.com' and retrieve the titles of two pages, using scrapy library:

import scrapy

class Crawler(scrapy.Spider):
    name = "quotes"
    start_urls = [
        "https://quotes.toscrape.com/page/1/",
        "https://quotes.toscrape.com/page/2/",
    ]

    def parse(self, response):
        print(response.css("title::text").get())

On my apple MacbookPro (m1 pro chip), it gives me a 'MemoryError':

MemoryError: Cannot allocate write+execute memory for ffi.callback(). 
You might be running on a system that prevents this.
For more information, see https://cffi.readthedocs.io/en/latest/using.html#callbacks

What can I do to make it work ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source