ImportError: No module named 'twisted.persisted'
See original GitHub issueI haved install scrapy on Python 3.5.2
, but when I exeute scrapy -v
on command-line, it occurs:
>> scrapy -v
Traceback (most recent call last):
File "/usr/bin/scrapy", line 7, in <module>
from scrapy.cmdline import execute
File "/usr/local/python3.5.2/lib/python3.5/site-packages/scrapy/__init__.py", line 27, in <module>
from . import _monkeypatches
File "/usr/local/python3.5.2/lib/python3.5/site-packages/scrapy/_monkeypatches.py", line 20, in <module>
import twisted.persisted.styles # NOQA
ImportError: No module named 'twisted.persisted'
So I enter ipython3 to ensure whether it’s installed porperly:
In [2]: import twisted
In [3]: twisted.version
Out[3]: Version('twisted', 15, 2, 1)
But when I import scrapy
, the same as command-line:
In [4]: import scrapy
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-4-51c73a18167b> in <module>()
----> 1 import scrapy
/usr/local/python3.5.2/lib/python3.5/site-packages/scrapy/__init__.py in <module>()
25
26 # Apply monkey patches to fix issues in external libraries
---> 27 from . import _monkeypatches
28 del _monkeypatches
29
/usr/local/python3.5.2/lib/python3.5/site-packages/scrapy/_monkeypatches.py in <module>()
18 # Undo what Twisted's perspective broker adds to pickle register
19 # to prevent bugs like Twisted#7989 while serializing requests
---> 20 import twisted.persisted.styles # NOQA
21 # Remove only entries with twisted serializers for non-twisted types.
22 for k, v in frozenset(copyreg.dispatch_table.items()):
ImportError: No module named 'twisted.persisted'
I’m so confused, I just want to run a spaider, So help me ! 🆘
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:11 (7 by maintainers)
Top Results From Across the Web
ImportError: No module named twisted.persisted.styles
From IDLE, I tried to run a script with a newly installed scrapy 1.0.3. I'm using a script from a friend whom it...
Read more >Python – ImportError: No module named twisted.persisted.styles ...
From IDLE, I tried to run a script with a newly installed scrapy 1.0.3. I'm using a script from a friend whom it...
Read more >Scrapy error, "ImportError: No module named twisted"
I've been googling this and trying to solve for a few hours, but no dice yet. I've tried installing the twisted module and...
Read more >解决import twisted.persisted.styles # NOQA ...
import twisted.persisted.styles # NOQA. ModuleNotFoundError: No module named 'twisted.persisted'. 通过排查:. [root@localhost Python3.6.3]# ...
Read more >How to install Python-twisted
Done E: Unable to locate package python-twisted pi@rpitest64:~ ... Factory ImportError: No module named twisted.internet.protocol ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@rolando Thanks a lot !
Conda
is useful, my pip works again after installing conda. And it’s easy to install scrapy just byconda install scrapy
. 👍@Keleir try using
conda
, see https://conda.io/docs/install/quick.html and https://doc.scrapy.org/en/latest/intro/install.html#anaconda