'Scrapy Import Error: No Module named Scrapy

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!



Solution 1:[1]

Could you use:

pip install Scrapy

source

import scrapy

print(scrapy.__version__)

output:

1.8.0

when I run:

from scrapy import Selector

I get no error

Solution 2:[2]

Try to install it with conda and secondly set your python environ path.

Solution 3:[3]

#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

Sources

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

Source: Stack Overflow

Solution Source
Solution 1 BpY
Solution 2 richardec
Solution 3 Samsul Islam