原创

python 常用的命令



  • 配置阿里源
pip config set global.index-url http://mirrors.aliyun.com/pypi/simple/
pip config set install.trusted-host mirrors.aliyun.com
pip config list

  • 生成依赖包版本清单文件
pip freeze > requirements.txt
  • 引入依赖包指定版本
pip install -r requirements.txt

  • 打包成exe
pyinstaller --onefile  --icon=m.ico --name=getmv.exe  .\xxx.py
  --onefile       打包成单文件
  --noconsole     运行exe文件的时候不打开小黑框
  --icon=m.ico    指定图标
  --name=xxx.exe  指定应用名称

Python
  • 作者:一介闲人(联系作者)
  • 发表时间: 2026-02-02 15:52
  • 版权声明:原创-转载需保持署名
  • 公众号转载:请在文末添加本文链接
  • 评论