Linux系统上运行scrapy框架代码环境安装教程

115 篇文章 0 订阅
52 篇文章 2 订阅

1: we have to install python enviroment.Linux system has its own python,but the edtion maybe too old.we can use it or install our own python.The way to install python is following.

install python

sudo yum install -y python36u python36u-libs python36u-devel python36u-pip
python3.6 -V

other way

wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tar.xz

tar -xJf Python-3.6.4.tar.xz

cd Python-3.6.4

./configure --prefix=/usr/local/python3

make && make install
ln -s /usr/local/python3/bin/python3.6 /usr/bin/python
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip

note:the problem i had after i install python is :i input python in the terminal to check if python is install successfully.but it said python is not a comman!.I thoght i failed in installing,so i tried many ways.But i found the way i checked is worong!i have to input python3.6 -V to check!

2:have to install environment for scrapy ,anaconda can also be used in Linux.The way to install anaconda is following:

install anaconda

(1)curl -O

https://repo.anaconda.com/archive/Anaconda3-5.3.0-Linux-x86_64.sh

(2)sh Anaconda3-5.3.0-Linux-x86_64.sh

say yes

use anaconda

export PATH="/root/anaconda3/bin:$PATH"
conda

note:just do every step one by one.

3.add anaconda to system path

参考:https://blog.csdn.net/m0_37041325/article/details/77169972
1.修改~/.bashrc

2.添加export PATH=/home/lishanliao/anaconda3/bin:$PATH

3.source ~/.bashrc

4.install scrapy and redis 、pymongo

conda install -c scrapinghub scrapy
redis and pymongo cannot be install by conda,so we have to use:pip install redis/pip install pymongo to finsh the install .

It takes me two day to solve the problems ,but now i am successfully install the linux environment for scrapy!
Even i am slow but can not give up!

https://www.jianshu.com/p/a72566e539be

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值