Pythonpython爬虫我的Python自学之路

How to install Scrapy 3.1.1rc3 f

2016-06-05  本文已影响546人  yorkzhang

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.

上一篇 下一篇

猜你喜欢

热点阅读