How to install Scrapy 3.1.1rc3 for Python3 on Windows and use it in Pycharm

It is really painful if you try to install Scrapy on Windows, not mention the RC version for Python3.

Here is what I found to install it finally.

  1. I highlight recommend you install Conda first. It is a package manager and also can create virtual enviroment. (In shot, Conda == advanced pip|easy_install + virtualenv)
    Download MiniConda from here:
    http://conda.pydata.org/miniconda.html

Select 64-bit (exe installer) or 32-bit (exe installer). Download and install it.

  1. Create a virtual environment(I use Py3Scrapy as the environment name):
    conda create --name Py3Scrapy python=3

By default the enviroment will be created under C:\Miniconda3\envs

  1. Activate the Py3Scrapy environment.
    activate Py3Scrapy

  2. Install the lxml package
    conda install lxml

  3. Install Scrapy 1.1.0rc3

pip install Scrapy==1.1.0rc3

Now Scrapy 1.1.0rc3 is successfully installed. If you want to create a Scrapy project, run(ScrapyTest is my project name):

scrapy startproejct ScrapyTest

Then, load the project folder in PyCharm and open File-->Settings-->Project:<Your project name> -->Project Interpreter-->choose python.exe by using "Add local" in the virtual environment folder you just created.

Note: If you receive error like:
cannot import name '_win32stdio'
run the following to resolve it:
pip install twisted-win

This approach should work on Mac and Linux as well if you modify some steps.
Please let me know there is something wrong or missing. Thanks.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容