First, the installation environment check if the package is installed
Yum Install GCC
Yum Install Zlib-devel
Yum Install make
Yum Install-y OpenSSL Openssl-devel
Ii. Start installation of python3.6
wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgztar vxf python-3.6.1.tgzcd python-3.6.1.tgz. Configure--prefix=/usr/local #编译, customizing the installation directory, if the custom directory is not important for environment variables, to add the installed directory to the environment variable make && make install #这个过程会非常慢 Ln–s/usr/local/bin/python3/usr/bin/python3 #建立软连接
Third, check whether the installation is successful
[[email protected] ~]# Python3python 3.6.1 (default, 5, 23:14:39) [GCC 4.4.7 20120313 (Red Hat 4.4.7-11)] on L Inuxtype "Help", "copyright", "credits" or "license" for more information.>>> Quit ()
Iv. installation of django==1.10.5
After the installation is complete python3.6 should be automatically installed pip9.0.1 so install Djangopip installed django==1.10.5 and then do a soft connection ln-s/usr/local/bin/django-admin.py/usr /bin/django-admin
V. Check if the Django command will run
[Email protected] ~]# django-admin
< subcommand > ' For help on a specific subcommand. Available Subcommands:[django] check compilemessages createcachetable Dbshell Diffsettings dumpdata flush inspectdb loaddata makemessages makemigrations Migrate Runserver
Run the django-admin command to see if the following subcommands can appear, if not, create a soft connection or add an environment variable
1, Ln-s/usr/local/bin/django-admin.py/usr/bin/django-admin
2.export PATH=$PATH:/usr/local/python3/bin‘
Centos 6.6 Installation python3.6 and Django1.10.5