zoukankan      html  css  js  c++  java
  • 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/

  • 相关阅读:
    第五章课后练习题
    第四章课后练习
    函数
    变量、常量及类型
    go环境搭建及编辑器安装
    Matplotlib(绘图和可视化)
    Pandas例题(以NBA球队为例)
    Pandas
    Numpy
    jupyter notebook编辑器的用法
  • 原文地址:https://www.cnblogs.com/jumpkin1122/p/11503149.html
Copyright © 2011-2022 走看看