linux(centos)搭建基于python3的Django环境
2021-04-23 18:29
标签:dev eve ssl 链接 安装python libffi www zip2 zlib 一、centos安装python3 1、安装依赖包: sudo yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel libffi-devel mysql-devel gcc gcc-devel python-devel 2、下载python3.7的安装包 执行命令 sudo wget https://www.python.org/ftp/python/3.7.7/Python-3.7.7.tar.xz 3、解压 sudo tar -xvf Python-3.7.7.tar.xz 4、配置安装位置 cd Python-3.7.7 ./configure --prefix=/usr/local/python3 5、编译安装 sudo make sudo make install 6、添加软链接 sudo ln -s /usr/local/python3/bin/python3 /usr/bin/python3 二、升级系统的sqlite版本(Django需要版本高于3.8.3) 1、下载安装包 sudo tar -xvf sqlite-autoconf-3320300.tar.gz 2、解压安装包 sudo tar -xvf sqlite-autoconf-3320300.tar.gz 3、配置安装位置 cd sqlite-autoconf-3320300 sudo ./configure --prefix=/usr/local 4、替换系统的sqlite linux(centos)搭建基于python3的Django环境 标签:dev eve ssl 链接 安装python libffi www zip2 zlib 原文地址:https://www.cnblogs.com/Eric-zhao/p/13268698.html
sudo ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3
sudo mv /usr/bin/sqlite3 /usr/bin/sqlite3_old
sudo ln -s /usr/local/bin/sqlite3 /usr/bin/sqlite3
sudo echo "/usr/local/lib" > /etc/ld.so.conf.d/sqlite3.conf
sudo ldconfig
三、安装Django
sudo pip3 install Django==3.0.8
文章标题:linux(centos)搭建基于python3的Django环境
文章链接:http://soscw.com/index.php/essay/78614.html