编程语言
首页 > 编程语言> > Python3项目初始化

Python3项目初始化

作者:互联网

Python3项目初始化
[root@VM-4-12-centos ~]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
[root@VM-4-12-centos ~]# hostname txy 临时修改主机名,主机重启不生效
[root@VM-4-12-centos ~]# /bin/bash
[root@txy ~]# yum install tree wget -y
[root@txy ~]# pip3 install virtualenv
[root@txy tmp]# wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tgz
[root@txy tmp]# yum install -y gcc gcc-c++ zlib*
[root@txy tmp]# tar zxvf Python-3.6.8.tgz
[root@txy tmp]# cd Python-3.6.8/
[root@txy Python-3.6.8]# ./configure --enable-shared --prefix=/usr/local/python3
[root@txy Python-3.6.8]# make &&make install
[root@txy Python-3.6.8]# /usr/local/python3/bin/python3 -V
[root@txy Python-3.6.8]# virtualenv -p /usr/local/python3/bin/python3.6 /app/py36env
[root@txy Python-3.6.8]# source /app/py36env/bin/activate
(py36env) [root@txy ~]# python -V
(py36env) [root@txy ~]# pip list
(py36env) [root@txy ~]# pip freeze
(py36env) [root@txy ~]# pip install Django==2.0.5
(py36env) [root@txy ~]# /app/project/06
(py36env) [root@txy ~]# django-admin startproject cmdb
(py36env) [root@txy ~]# deactivate 退出env虚拟环境

标签:初始化,install,项目,Python,3.6,txy,py36env,root,Python3
来源: https://www.cnblogs.com/sunnyyangwang/p/16504285.html