I installed scrapy using the command line
pip install git+https://github.com/scrapy/scrapy@master --no-dependencies --upgrade
once installed, I tried importing scrapy in one of my python projects but an error arises saying:
Traceback (most recent call last):
File "C:\Users\Lenovo\Desktop\Linkedin\script.py", line 7, in <module>
from scrapy import Selector
ImportError: No module named scrapy
[Finished in 0.983s]
What shall I do? Can't find a correct solution on Google yet!
Could you use:
pip install Scrapy
import scrapy
print(scrapy.__version__)
output:
1.8.0
when I run:
from scrapy import Selector
I get no error
#To install Scrapy using conda run:
conda install -c conda-forge scrapy
#if you're already familiar with installation of Python packages, you can install Scrapy
pip install Scrapy
尝试使用 conda 安装它,然后设置你的 python 环境路径。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.