One, the establishment of the development environment
1. Install mysql
2. Install Navicat for mysql
Second, the construction of the virtual environment
1. Create cmd.bat
1) Create a new cmd.bat on the desktop, enter cmd in it, and save
2. Install the driver
1)pip install virtualenvwrapper-win
pip install virtualenv
pip install virtualenvwrapper
2) mkvirtualenv -p C:\anaconda3\python.exe article_spider
first select the python to be used as the virtual environment, then build a folder named article_spider and
cd into the file directory, and then enter activate to activate the
red box in the virtual environment . Inside is the location of the virtual environment folder
3. Install lxml, twisted, pywin32
URL: https://www.lfd.uci.edu/~gohlke/pythonlibs/
cmd, first enter the download path, and then
pip install -i https://pypi.douban.com/simple "downloaded file name"
4. Install scrapy
pip install -i https://pypi.douban.com/simple scrapy is
to install using Douban mirror source
5. Create a project
into the virtual environment, and then enter scrapy startproject ArticleSpider to create
6. Configure the pycharm interpreter
file-settings-search interpreter-add-existing environment- find python.exe in the virtual environment