• Centos7安装python36,配置国内pip原(win+linux)


    yum安装python与pip

    # 安装EPEL和IUS软件源

    yum install epel-release -y

    yum install https://centos7.iuscommunity.org/ius-release.rpm -y

    # 安装python3.6 和 pip3.6

    yum install python36u -y

    yum install python36u-devel –y

    yum install python36u-pip -y

    # 创建软连接

    ln -s /bin/python3.6 /bin/python3

    ln -s /bin/pip3.6 /bin/pip3

    源码安装

    tar –zxvf Python-3.6.8.tgz

    yum install gcc

    ./configure –prefix=/usr/python3

    make && make install

    ln –s /usr/Python3/bin/python3 /usr/bin/python3

    配置国内pip原

    阿里云 https://mirrors.aliyun.com/pypi/simple/

    中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/

    豆瓣(douban) http://pypi.douban.com/simple/

    清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/

    中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/

    # 临时使用

    pip install numpy -i https://mirrors.aliyun.com/pypi/simple/

    # 永久修改

    Linux:  

    在~/.pip/pip.conf (没有就创建一个)文件比编辑如下内容:

    [global]

    index-url = https://mirrors.aliyun.com/pypi/simple/

    Window:

    win+r打开运行输入%APPDATA%,打开的目录下新建pip目录,新建的pip目录下创建pip.ini文件并编辑如下内容:

    [global]

    index-url = https://mirrors.aliyun.com/pypi/simple/

  • 相关阅读:
    SQL EXPLAIN优化详解
    2019数据智能算法大赛赛后复盘
    K-D树详解
    点云配准相关
    pandas速查手册(中文版)
    Windows CMD命令大全
    获取时间戳
    SQL 字符串转成临时表
    delphi cxgrid明细新增第三行的报错【Key violation】
    cxgrid列的Properties(cxPopupEditPopup)的关闭方法
  • 原文地址:https://www.cnblogs.com/jumpkin1122/p/11503149.html
Copyright © 2020-2023  润新知