码迷,mamicode.com
首页 > 编程语言 > 详细

Linux下安装Python3.5.2、Django、paramiko

时间:2018-09-29 00:04:42      阅读:395      评论:0      收藏:0      [点我收藏+]

标签: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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!