Skip to content

基础使用指南

快速开始

安装依赖

pip install pinstaller

基础配置

from pinstaller import PInstaller

# 初始化实例
installer = PInstaller()

# 配置参数
installer.configure({
    'target_dir': '/usr/local/bin',
    'backup_existing': True
})

核心功能

包管理

# 安装包
installer.install('requests')

# 卸载包
installer.uninstall('numpy')

# 更新包
installer.update('pandas')

依赖解析

```python

自动依赖解析

dependencies = installer.resolve_dependencies('tensorflow')

手动依赖管理

installer.add_dependency('numpy', '>=1.20.0')