Linux下安装Python3.5.2Djangoparamiko

Posted 月黑风高杀人夜

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux下安装Python3.5.2Djangoparamiko相关的知识,希望对你有一定的参考价值。

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,解压、安装

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

4,配置环境变量

[email protected] bin]# cd /usr/python3/bin
[[email protected] 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.
[[email protected] bin]#PATH=$PATH:/usr/python3/bin/

[[email protected] 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

[email protected] 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的版本
[[email protected] tmp]# python3 -m pip install -i http://pypi.douban.com/simple/ --upgrade pip --trusted-host pypi.douban.com

 





以上是关于Linux下安装Python3.5.2Djangoparamiko的主要内容,如果未能解决你的问题,请参考以下文章

mysql + Python3.5.2 + Django + Uwsgi + Nginx实现生产环境

Linux如何去部署Django (Nginx + uwsgi + Python3 + Django)

linux:python3.5.2如何下载pandas

ubuntu12.04下安装Python3.5.2

ubuntu12.04下安装Python3.5.2 1

win10 python3.5.2环境下 安装xgboost