An error was reported when creating a new scrapy project. The module No module named 'twisted.persisted' was not found.

system: Ubuntu 16.4
python3.6
twisted-15.2.1
Scrapy 1.5.0 is also installed in the virtual environment

prompt the following message when creating a Scrapy:

(pyvirSpider) root@ubuntu:/myScrapy-sharp scrapy startproject test
Traceback (most recent call last):
File "/ myPyVirtualenv/pyvirSpider/bin/scrapy", line 7, in < module >

from scrapy.cmdline import execute

File "/ myPyVirtualenv/pyvirSpider/lib/python3.6/site-packages/scrapy/__init__.py", line 27, in < module >

from . import _monkeypatches

File "/ myPyVirtualenv/pyvirSpider/lib/python3.6/site-packages/scrapy/_monkeypatches.py", line 20, in < module >

import twisted.persisted.styles  -sharp NOQA

ModuleNotFoundError: No module named "twisted.persisted"

Mar.03,2021

solution to the problem first uninstall the existing version of twisted
pip uninstall twisted and refer to
https://blog.csdn.net/ZunHaiF.

.
Menu