安装
准备环境:
centos7
[root@test ~]# python -V
Python 2.7.5
[root@test ~]# python -c "import tornado; print(tornado.version)"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named tornado
先安装pip
[root@localhost ~]# curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1604k 100 1604k 0 0 403k 0 0:00:03 0:00:03 --:--:-- 403k
[root@localhost ~]# ls
0817_2.pcap anaconda-ks.cfg index.html index.html.11 index.html.14 index.html.3 index.html.6 index.html.9
0911_4.pcap get-pip.py index.html.1 index.html.12 index.html.15 index.html.4 index.html.7 login_mysql.py
1.pcap go index.html.10 index.html.13 index.html.2 index.html.5 index.html.8
[root@localhost ~]#
[root@localhost ~]# python get-pip.py
Collecting pip
Downloading https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl (1.3MB)
100% |████████████████████████████████| 1.3MB 328kB/s
Collecting setuptools
Downloading https://files.pythonhosted.org/packages/96/06/c8ee69628191285ddddffb277bd5abdf769166e7a14b867c2a172f0175b1/setuptools-40.4.3-py2.py3-none-any.whl (569kB)
100%