I have installed Anaconda and downloaded Scrapy through it. Now when I want to start a new Scrapy project using Pycharm, it says that
Scrapy is not recognized as an internal or external command, operable program or batch file.
What should I do?
I have installed Anaconda and downloaded Scrapy through it. Now when I want to start a new Scrapy project using Pycharm, it says that
Scrapy is not recognized as an internal or external command, operable program or batch file.
What should I do?
Assuming it's a virtual environment problem ...
First, it should be clarified that Anaconda uses a virtual environment system similar to pyenv
or virtualenv
: check this to know more.
By default, Anaconda has a "base" environment, which is the one I assume you have installed scrapy
on.
You can create new environments with:
conda create -n <env_name> python=<version>
Having clarified this, you have to take into account that what is installed in an environment is only available in that environment.
When creating a new project in PyCharm, it creates a new environment by default (with virtualenv
, pipenv
, or whatever depending on how it is configured by default).
If you want to use a conda environment you must add it to PyCharm and select it as an interpreter in your PyCharm project.
Then, what you install in that environment ...
conda install -c conda-forge scrapy
pip install scrapy
... will be available in the terminal and / or the python interpreter from PyCharm.