XiLaiTL小于 1 分钟

Install pipxopen in new window

Not RECOMMEND

Windows

pip install --user pipx

It is possible (even most likely) the above finishes with a WARNING looking similar to this:

WARNING: The script pipx.exe is installed in <USER folder>\AppData\Roaming\Python\Python3x\Scripts which is not on PATH

cd <USER folder>\AppData\Roaming\Python\Python3x\Scripts
.\pipx.exe ensurepath

Linux CentOS/OpenEuler

pip install --user pipx
python3 -m pipx ensurepath

Then restart the shell or use source ~/.bashrc.

RECOMMEND

Download the pipx.pyz from https://github.com/pypa/pipx/releasesopen in new window. And put them in the /bin

Add a bat script or shell script named pipx and has the content.

@echo off
python %~dp0/pipx.pyz %*
#!/bin/sh
python $(dirname "$(readlink -f "$0")")/pipx.pyz $@
#!/usr/bin/env pwsh
python $PSScriptRoot/pipx.pyz $args
使脚本生效

对于Windows系统来说, adding the path to the user environment path.

对于Linux系统来说,可以把python改为python3 然后给予权限

chmod +x /path/to/your_script.sh

将地址放进bash的环境里

gedit ~/.bashrc

在文件末尾添加:

export PATH="$PATH:/path/to/your_scripts_directory"

然后使配置失效

source ~/.bashrc
上次编辑于:
贡献者: XiLaiTL