One - One Code All

Blog Content

python的pip包安装及批量安装以及国内清华源

Python   2007-11-10 09:02:42
  1. pip安装python包

    pip install some-package

    pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package  (apscheduler  numpy pandas scikit-learn scipy requests cvxopt pycuda numba)
    注意,simple 不能少, 是 https 而不是 http


  2. pip安装python包指定版本

    pip install robotframework==2.8.7


  3. pip批量安装python包

    pip install -r requirement.txt
    pip install -i https://pypi.tuna.tsinghua.edu.cn/simple  -r requirements.txt


  4. 阿里云源安装

    pip3 install --no-cache-dir -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com -r requirements.txt


  5. python包批量导出

    pip freeze > requirements.txt


  6. 查看安装模块列表

    pip  list


  7. 查看site-packages位置

    python -m site --user-site


  8. python wheel 包下载

    https://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy

  9. pip安装本地wheel包

    pip install (.whl安装包名称)



上一篇:python各版本安装包国内镜像
下一篇:python设置国内pip源,国内镜像快

The minute you think of giving up, think of the reason why you held on so long.