asdf-python
asdf-python copied to clipboard
Broke a shim after pip uninstall then pip install -e .?
I somehow broke one of my shims,
I originally installed a module (promnesia) user-wide with pip3 install --user promnesia, then uninstalled with pip3 uninstall promnesia. I wanted to do dev work with the module, so I cloned down the repo and did a pip install -e . inside. This completed successfully. I can do
python
> import promnesia
with no issues. But when I try to use the shim, I get bash: /home/cobertos/.local/bin/promnesia: No such file or directory. I tried to asdf reshim, as well as deleting the shim in /home/cobertos/.asdf/shims/promnesia and then doing another asdf reshim and it still gives the same error.
It's almost like the shim is still pointing to the old --user installed version, somehow?
Woops, apparently I just needed a new terminal session?
command -v promnesia was returning /home/cobertos/.local/bin/promnesia in the old one (which doesn't exist), which is what with_shim_executable() uses to call $shim_exec which eventually is executed by asdf-python. The output of which promnesia outputs /home/cobertos/.asdf/shims/promnesia.
In a new terminal both command -v promnesia and which promnesia output /home/cobertos/.asdf/shims/promnesia.
The $PATH in both terminals appears to be the same though before running the commands, and trying to trace through the logic I can't see where the final PATH edit that would point to ~/Seafile/projects/FORKED/promnesia would be...
Solved my problem, but still confused
ha! I had this same problem
I think in my case the old terminal might have had the asdf shims pathed out by a direnv PATH_add call that I'd since removed.