Python网络爬虫之scrapy安装
2016-11-04 15:06
316 查看
参考:https://doc.scrapy.org/en/latest/index.html
1,安装pip
2,安装virtualenv
3,创建ENV
4,activate script
This will change your $PATH so its first entry is the virtualenv’s bin/ directory. (You have to use source because it changes your shell environment in-place.) This is all it does; it’s purely a convenience. If you directly run a script or the python interpreter from the virtualenv’s bin/ directory (e.g. path/to/ENV/bin/pip or /path/to/ENV/bin/python-script.py) there’s no need for activation.
The activate script will also modify your shell prompt to indicate which environment is currently active. To disable this behaviour, see VIRTUAL_ENV_DISABLE_PROMPT.
To undo these changes to your path (and prompt), just run:
5,To install scrapy on Ubuntu (or Ubuntu-based) systems, you need to install these dependencies:
Inside a virtualenv, you can install Scrapy with pip after that:
1,安装pip
wget https://bootstrap.pypa.io/get-pip.py sudo python get-pip.py
2,安装virtualenv
sudo pip install virtualenv
3,创建ENV
virtualenv ENV
4,activate script
cd ENV source bin/activate
This will change your $PATH so its first entry is the virtualenv’s bin/ directory. (You have to use source because it changes your shell environment in-place.) This is all it does; it’s purely a convenience. If you directly run a script or the python interpreter from the virtualenv’s bin/ directory (e.g. path/to/ENV/bin/pip or /path/to/ENV/bin/python-script.py) there’s no need for activation.
The activate script will also modify your shell prompt to indicate which environment is currently active. To disable this behaviour, see VIRTUAL_ENV_DISABLE_PROMPT.
To undo these changes to your path (and prompt), just run:
deactivate
5,To install scrapy on Ubuntu (or Ubuntu-based) systems, you need to install these dependencies:
(ENV) kylefan@kylefan-pc:~/ENV$ sudo apt-get install python-dev python-pip libxml2-dev libxslt1-dev zlib1g-dev libffi-dev libssl-dev
Inside a virtualenv, you can install Scrapy with pip after that:
(ENV) kylefan@kylefan-pc:~/ENV$ pip install scrapy
相关文章推荐
- Window环境下安装基于Python的Scrapy网络爬虫框架
- Python网络爬虫3 ---- ubuntu下安装爬虫框架scrapy
- 【网络爬虫】【python】网络爬虫(四):scrapy爬虫框架(架构、win/linux安装、文件结构)
- Python网络爬虫2 ---- scrapy爬虫架构介绍和初试
- win7(win32)安装python 爬虫工具scrapy记录
- [Python]网络爬虫(11):亮剑!爬虫框架小抓抓Scrapy闪亮登场!
- win7下安装scrapy(开源python爬虫)
- python爬虫 - scrapy的安装和使用
- windows-python爬虫之scrapy快速安装
- Python安装Scrapy爬虫工具
- centos6.3 安装python爬虫框架scrapy
- 安装python爬虫scrapy踩过的那些坑和编程外的思考
- Python爬虫框架Scrapy安装使用步骤
- ubuntu14.04安装python爬虫框架Scrapy
- 如何在Ubuntu 14.04 LTS安装网络爬虫工具:Scrapy
- 开源python网络爬虫框架Scrapy
- Python爬虫框架Scrapy实战之安装
- 零基础写python爬虫之爬虫框架Scrapy安装配置
- 开源python网络爬虫框架Scrapy
- Python爬虫Scrapy的安装配置