Cuando intento ejecutar "scrapy startproject" en vscode, aparece el siguiente error.
Traceback (most recent call last):
File "/Users/admin/Desktop/development/project/scrapyTutorial/venv/bin/scrapy", line 5, in <module>
from scrapy.cmdline import execute
File "/Users/admin/Desktop/development/project/scrapyTutorial/venv/lib/python3.9/site-packages/scrapy/__init__.py", line 12, in <module>
from scrapy.spiders import Spider
File "/Users/admin/Desktop/development/project/scrapyTutorial/venv/lib/python3.9/site-packages/scrapy/spiders/__init__.py", line 11, in <module>
from scrapy.http import Request
File "/Users/admin/Desktop/development/project/scrapyTutorial/venv/lib/python3.9/site-packages/scrapy/http/__init__.py", line 11, in <module>
from scrapy.http.request.form import FormRequest
File "/Users/admin/Desktop/development/project/scrapyTutorial/venv/lib/python3.9/site-packages/scrapy/http/request/form.py", line 10, in <module>
import lxml.html
File "/Users/admin/Desktop/development/project/scrapyTutorial/venv/lib/python3.9/site-packages/lxml/html/__init__.py", line 53, in <module>
from .. import etree
ImportError: dlopen(/Users/admin/Desktop/development/project/scrapyTutorial/venv/lib/python3.9/site-packages/lxml/etree.cpython-39-darwin.so, 0x0002): tried: '/Users/admin/Desktop/development/project/scrapyTutorial/venv/lib/python3.9/site-packages/lxml/etree.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/local/lib/etree.cpython-39-darwin.so' (no such file), '/usr/lib/etree.cpython-39-darwin.so' (no such file)
Y entonces me doy cuenta de que, el "archivo mach-o, pero es una arquitectura incompatible (tienen 'x86_64', necesitan 'arm64e') "es el principal promblem. He probado con https://github.com/nmwsharp/robust-laplacians-py/issues/7 y traté de desinstalar los paquetes viejos e instalarlos de nuevo usando arch -arm64 pip install Scrapy. Pero no funcionó...
Entonces... ¿cómo solucionar este problema...?