Need Proxy?

BotProxy: Rotating Proxies Made for professionals. Really fast connection. Built-in IP rotation. Fresh IPs every day.

Find out more


ImportError: No module named 'scrapy'

Question

I am fairly new to Python using 3.6 on Windows.

I have installed Scrapy using Anaconda:

> C:\Users\user.name>conda install scrapy Fetching package metadata
> ............. Solving package specifications: .
> 
> # All requested packages already installed.
> # packages in environment at C:\Users\user.name\AppData\Local\Continuum\Anaconda3:
> # scrapy                    1.3.3                    py36_0

However, when I try to import it n the Python IDE I get:

ImportError: No module named 'scrapy'

I also tried with pip which confirmed that all requirements are satisfied. I have searched for an answer and think this may be because I have installed it for one interpreter/environment and am trying to use it in another.

Although, I am not sure if this is correct, or how to tackle it. This is the first time I have used Anaconda (previously I'd just been using PyCharm and pip) so I'm going to spend some time today getting to grips with it, but would appreciate if anyone was able to point me in the right direction!

Answer

Try to create a new virtual environment in conda and install scrapy there, and don't forget to activate your environment. In PyCharm you can specify what environment you want to use for a project in Settings/YourProject/Project Interpreter.

cc by-sa 3.0