myexec

package
v0.5.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PYPI_INDEX_URL = os.Getenv("PYPI_INDEX_URL")
	PATH           = os.Getenv("PATH")
)

Functions

func AssertPythonPackage

func AssertPythonPackage(python3 string, pkgName, pkgVersion string) error

func Command

func Command(name string, arg ...string) *exec.Cmd

func EnsurePython3Venv

func EnsurePython3Venv(venv string, packages ...string) (python3 string, err error)

EnsurePython3Venv ensures python3 venv with specified packages venv should be directory path of target venv

func ExecCommandInDir

func ExecCommandInDir(cmd *exec.Cmd, dir string) error

func ExecPython3Command

func ExecPython3Command(cmdName string, args ...string) error

func GetPythonPackage added in v0.5.7

func GetPythonPackage(python3 string)

func GetPythonPackageVersions added in v0.5.8

func GetPythonPackageVersions(pkgName string) ([]string, error)

GetPythonPackageVersions 查询指定Python包的所有可用版本 返回版本号切片(按版本号从旧到新排序)

func InstallPip added in v0.5.7

func InstallPip(python3 string) error

InstallPip 安装pip(修复SSL证书验证错误版本)

func InstallPythonPackage

func InstallPythonPackage(python3 string, pkg string) (err error)

func KillProcessesByGpid

func KillProcessesByGpid(cmd *exec.Cmd) error

func RunCommand

func RunCommand(cmdName string, args ...string) error

func RunShell

func RunShell(shellString string) (exitCode int, err error)

func UninstallPip added in v0.5.7

func UninstallPip(python3 string) error

UninstallPip uninstalls pip from the specified Python3 executable It uses pip's own uninstall command for clean removal

func UninstallPythonPackage added in v0.5.7

func UninstallPythonPackage(python3 string, pkg string) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL