zoukankan      html  css  js  c++  java
  • 腾讯云安装python36

    安装对应的 Release 

    yum -y install epel-release
    
    Loaded plugins: fastestmirror, langpacks
    Loading mirror speeds from cached hostfile
    Resolving Dependencies
    --> Running transaction check
    ---> Package epel-release.noarch 0:7-12 will be installed
    --> Finished Dependency Resolution
    
    #得到ius-release.rpm
      
    [root@localhost ~]# wget https://centos7.iuscommunity.org/ius-release.rpm
    
    
     [root@VM_0_14_centos ~]# rpm -ivh ius-release.rpm 
    warning: ius-release.rpm: Header V4 RSA/SHA256 Signature, key ID 4b274df2: NOKEY
    Preparing...                          ################################# [100%]
    Updating / installing...
       1:ius-release-2-1.el7.ius          ################################# [100%]

    安装依赖文件

    yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel  mysql-commuity-devel gcc gcc-devel python-devel 

    安装python36

    #安装python36
     [root@VM_0_14_centos ~]# yum install -y python36u
    Loaded plugins: fastestmirror, langpacks
    Repository epel is listed more than once in the configuration
    Loading mirror speeds from cached hostfile
    Package python36u is obsoleted by python3, trying to install python3-3.6.8-10.el7.x86_64 instead

    安装pip

    [root@VM_0_14_centos ~]# yum install -y python36u-pip python36u-devel
    Loaded plugins: fastestmirror, langpacks
    Repository epel is listed more than once in the configuration
    Loading mirror speeds from cached hostfile
    Package python36u-pip is obsoleted by python3-pip, trying to install python3-pip-9.0.3-7.el7_7.noarch instead

    修改pip源  

    [root@VM_0_14_centos ~]# mkdir ~/.config/pip/
    vim ~/.config/pip/pip.conf
    [global]
    index-url = http://mirrors.aliyun.com/pypi/simple/
    trusted-host = mirrors.aliyun.com
    
    保存退出                           

    配置虚拟环境

    更新完成后,在 Home 目录下创建一个 django 的测试项目,用于我们后续的测试。

    正式项目部署时也参考这里的步骤

    cd /home/
    mkdir django
    cd django
    python3.6 -m venv venv

    安装django

    . venv/bin/activate
    pip install django==2.1.8
  • 相关阅读:
    Java 执行
    Java 反射
    Mysql 日常
    Java 引用
    Mysql insert on update
    Java Mail 异常
    HDU_5456_数位dp
    HDU_4734_数位dp
    POJ_1221_DP
    POJ_1050_最大子矩阵
  • 原文地址:https://www.cnblogs.com/xiao-apple36/p/12563585.html
Copyright © 2011-2022 走看看