建立虛擬環境
~/project/hanqin/django> virtualenv monitor2
~/project/hanqin/django/monitor2> cd bin
~/project/hanqin/django/monitor2/bin> source activate

上傳Django-1.11.11到如下文件夾
~/project/hanqin/django/monitor2/tmp
~/project/hanqin/django/monitor2/tmp> cd Django-1.11.11/
~/project/hanqin/django/monitor2/tmp/Django-1.11.11> python3 setup.py install

安裝時候最後面由於沒網報錯,

Processing dependencies for Django==1.11.11
Searching for pytz
Reading https://pypi.python.org/simple/pytz/
Download error on https://pypi.python.org/simple/pytz/: unknown url type: https -- Some packages may not be found!
Couldn't find index page for 'pytz' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: unknown url type: https -- Some packages may not be found!
No local packages or working download links found for pytz
error: Could not find suitable distribution for Requirement.parse('pytz')python

 

去官網下載對應版本的tz,tz是timezone時區的意思,我用的python3.6下的是標紅版本linux

https://pypi.python.org/pypi/pytz/#downloads數據庫

 

 

~/project/hanqin/django/monitor2/tmp> tar -zxvf pytz-2018.3.tar.gz django

~/project/hanqin/django/monitor2/tmp> cd pytz-2018.3/bash

~/project/hanqin/django/monitor2/tmp/pytz-2018.3> python3 setup.py  installoracle

 

 

 

~/project/hanqin/django/monitor2/tmp/pytz-2018.3> cd /home/insp_ap/project/hanqin/django/monitor2/lib/python3.6/site-packages/app

~/project/hanqin/django/monitor2/lib/python3.6/site-packages> ls -lrt
total 511
drwxr-xr-x 2 insp_ap users 344 Apr 7 10:42 setuptools-28.8.0.dist-info
drwxr-xr-x 5 insp_ap users 1032 Apr 7 10:42 setuptools
drwxr-xr-x 5 insp_ap users 160 Apr 7 10:42 pkg_resources
-rw-r--r-- 1 insp_ap users 126 Apr 7 10:42 easy_install.py
drwxr-xr-x 2 insp_ap users 96 Apr 7 10:42 __pycache__
drwxr-xr-x 2 insp_ap users 312 Apr 7 10:42 wheel-0.29.0.dist-info
drwxr-xr-x 6 insp_ap users 592 Apr 7 10:42 wheel
drwxr-xr-x 2 insp_ap users 280 Apr 7 10:42 pip-9.0.1.dist-info
drwxr-xr-x 11 insp_ap users 648 Apr 7 10:42 pip
drwxr-xr-x 4 insp_ap users 96 Apr 7 10:50 Django-1.11.11-py3.6.egg
-rw-r--r-- 1 insp_ap users 510240 Apr 7 10:56 pytz-2018.3-py3.6.egg
-rw-r--r-- 1 insp_ap users 51 Apr 7 10:56 easy-install.pth
(monitor2) insp_ap@inspect01:~/project/hanqin/django/monitor2/lib/python3.6/site-packages>ui

~/project/hanqin/django/monitor2/lib/python3.6/site-packages> cat easy-install.pth
./Django-1.11.11-py3.6.egg
./pytz-2018.3-py3.6.egg

this