zoukankan      html  css  js  c++  java
  • pip 国内源 包管理

    配置国内源

    • linux配置
      修改 ~/.pip/pip.conf 文件,如下,添加了源并修改了默认超时时间
    [global]
    timeout = 3000
    index-url = http://mirrors.aliyun.com/pypi/simple
    [install]
    trusted-host=mirrors.aliyun.com
    
    • windows配置
      C:Users用户名pip下新建pip.ini文件
    [global]
    index-url = http://mirrors.aliyun.com/pypi/simple/
    [install]
    trusted-host=mirrors.aliyun.com
    
    • 临时使用豆瓣源 pip3 install -i https://pypi.doubanio.com/simple/ -r requirements.txt
      镜像源:
    清华:https://pypi.tuna.tsinghua.edu.cn/simple
    阿里云:http://mirrors.aliyun.com/pypi/simple/
    中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
    华中理工大学:http://pypi.hustunique.com/
    山东理工大学:http://pypi.sdutlinux.org/ 
    豆瓣:http://pypi.douban.com/simple/
    

    离线安装包

    pip install --upgrade xxx      # 升级xxx包
    # 下载已安装的包
    pip freeze > requirements.txt
    pip download -d dir -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com    # 临时通过国内源下载所有包
    
    # 安装已下载的包
    pip install --no-index --find-index=d:python27dir -r requirements.txt
    

    常用包

    # 手机相关
    pip install uiautomator2
    pip install opencv-python
    # 界面相关
    pip install pyside2
    pip install pyqt5
    pip install pyqt5-tools # qt5的图形界面工具,如qtdesinger
    # 音频相关
    pip install sounddevice # 操作声卡相关
    pip install soundfile # 操作音频文件
    
    # 办公相关
    pip install xlwings
    pip install pyinstaller
    # 其他工具
    pip install numpy
    pip install pyserial
    
    

    Pyinstaller 打包

    pyinstaller -F: 生成单个可执行文件
    pyinstaller -w: 没有console
    
    pyinstaller -w -p D:ProgramsiMiniconda3envsappnovaScripts --hidden-import PySide2.QtXml xml_qt.py --icon="logo.ico"
    
  • 相关阅读:
    poj 1860 Currency Exchange(最短路径的应用)
    poj 2965 The Pilots Brothers' refrigerator
    zoj 1827 the game of 31 (有限制的博弈论)
    poj 3295 Tautology (构造法)
    poj 1753 Flip Game(枚举)
    poj 2109 (贪心)
    poj 1328(贪心)
    Qt 对单个控件美化
    Qt 4基础
    Bash Shell
  • 原文地址:https://www.cnblogs.com/qev211/p/15128113.html
Copyright © 2011-2022 走看看