Linux下安装Python3.5.2、Django、paramiko

2021-06-17 10:04

阅读:670

标签:org   http   form   default   4.4   配置环境变量   orm   cat   fail   

1,安装依赖文件:

yum install zlib zlib-devel openssl openssl-devel

 

2,下载Python3.5.2:

安全连接时,要增加:--no-check-certificate

wget --no-check-certificate https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz

 

3,解压、安装

[root@Server tmp]#tar -xf Python-3.5.2.tgz
[root@Server tmp]#cd  Python-3.5.2.tgz
[root@Server tmp]#./configure --prefix=/usr/python3 
[root@Server tmp]#make && make install

4,配置环境变量

root@Server bin]# cd /usr/python3/bin
[root@Server bin]# ./python3
Python 3.5.2 (default, Sep 16 2018, 01:55:10) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-23)] on linux
Type "help", "copyright", "credits" or "license" for more information.
[root@Server bin]#PATH=$PATH:/usr/python3/bin/

[root@Server bin]# echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/python3/bin/

5,执行Python3

root@Server bin]# python3
Python 3.5.2 (default, Sep 16 2018, 01:55:10) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-23)] on linux
Type "help", "copyright", "credits" or "license" for more information.

 

6,安装Django和paramiko

pip3 install -i http://pypi.douban.com/simple/ paramiko --trusted-host pypi.douban.com
pip3 install -i http://pypi.douban.com/simple/ django --trusted-host pypi.douban.com
  ########如果出现错误 Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-z18k0zhw/pynacl/
###更新pip的版本
[root@Server tmp]# python3 -m pip install -i http://pypi.douban.com/simple/ --upgrade pip --trusted-host pypi.douban.com

 

Linux下安装Python3.5.2、Django、paramiko

标签:org   http   form   default   4.4   配置环境变量   orm   cat   fail   

原文地址:https://www.cnblogs.com/castielsun/p/9721480.html


评论


亲,登录后才可以留言!