pipx upgrade replaces `.` with `-` in path
See original GitHub issueBackground
I have a setup where machines with different OSs share the home folder, and I want to install a package to be run on all of them, so in ~/.bashrc
I set different pipx folders for each OS case and I install different versions of pipx in each:
# pipx handling, added 2022-06-20
OS=`lsb_release -si`_`lsb_release -sr`
case $OS in
RedHatEnterprise_8.5) # r8
export PIPX_HOME=$HOME/.local-rel8
echo "Pippo"
export PIPX_DEFAULT_PYTHON=/modules/rhel8/user-apps/python/python-3.10.4/bin/python3
;;
Ubuntu_18.04) # bionic
export PIPX_HOME=$HOME/.local-bionic
export PIPX_DEFAULT_PYTHON=/modules/bionic/user-apps/python/python-3.7.3/bin/python3
;;
CentOS_7*) # centos7
export PIPX_HOME=$HOME/.local-centos7
export PIPX_DEFAULT_PYTHON=/modules/centos7/user-apps/python/python-3.7.3/bin/python3
;;
*) # otherwise
echo "no known OS"
;;
esac
export PIPX_BIN_DIR=$PIPX_HOME/bin
then to install the package I run on each machine respectively :
~/.local-r8/bin/pipx install [mypackageurl]
~/.local-centos/bin/pipx install [mypackageurl]
~/.local-bionic/bin/pipx install [mypackageurl]
which makes it available where it should be :
~/.local-r8/bin/[mycommand]
~/.local-centos/bin/[mycommand]
~/.local-bionic/bin/[mycommand]
Problem
the issue I have is when I need to upgrade the package, if I try for example
~/.local-r8/bin/pipx upgrade ~/.local-r8/bin/[mycommand] --verbose
what I get is :
pipx >(setup:757): pipx version is 1.1.0
pipx >(setup:758): Default python interpreter is '/modules/rhel8/user-apps/python/python-3.10.4/bin/python3'
pipx >(run_pipx_command:169): Virtual Environment location is ~/-local-r8/bin/[mycommand]
Package is not installed. Expected to find ~/-local-r8/bin/[mycommand], but it does not exist.
so the .
in .local-r8
is replaced by -
…
I can still upgrade with forcing a reinstall, for example
~/.local-r8/bin/pipx install --force [mypackageurl]
but I was wondering if this is as intended, and I am doing something wrong, or if there’s a bug somewhere
Issue Analytics
- State:
- Created a year ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
I guess this closes this issue, thanks for the follow up
I see, since the command is not in path I thought I had to pass its full path, but running
~/.local-[r8|centos7|bionic]/bin/pipx upgrade [mycommand]
indeed works…