-
Notifications
You must be signed in to change notification settings - Fork 432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dangerous command-line incompatibility with pip #144
Comments
So sorry to hear that it deleted your project! I have never heard of this happening before. I will definitely read everything over and make changes if necessary. One other thing that may help is to run with the In the mean time I would suggest using virtual environments for development. https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/ |
This issue may be related to #137 since that also unexpectedly deleted packages. |
@apnewberry thanks for pointing that out. I will get this fixed ASAP. |
This has been fixed in 0.13.1.0
This has been fixed as well.
I could possibly modify pipx to use pip to determine the package name, but right now pipx requires the user to specify the package name.
If you re-run with the |
I am going to close this issue since the removal of existing venvs has been fixed. For the other problem, feel free to open a new issue and add verbose output. |
User story
I have a Python package that I develop locally,
~/projects/foo
. Previously, I installed it bypip install --user -e ~/projects/foo
, where the-e
is necessary in order to avoid reinstalling after every change. Now I want to modernize my Python package management, so I want to try pipx. Just to check that-e
is supported, I checkpipx install --help
. I see that it is, so I runpipx install -e ~/projects/foo
. But then I get this error:I'm briefly very confused, but then figure that this message was supposed to be passed through
str.format
. I'm still quite confused, though, because this message doesn't explain anything about what the problem is. It seems like pipx thinks this package is installed. Just to check, I runpip list
and confirm that it isn't. As suggested in the error message, I runpipx install --force -e ~/projects/foo
. This deletes my project!! This is very upsetting, since nothing in the error message suggested this is what would happen. Also, it still doesn't work:After I restore my project from a backup, I look again at
pipx install --help
to see if I missed anything. I find this statement:I am quite confused why the package name I give
pipx
wouldn't normally be passed topip install
. I don't see any explanation of what the alternative is. But nevertheless I trypipx install -e --spec ~/projects/foo
. This gives me a usage error:None of this makes any sense to me given that
pip install --user -e ~/projects/foo
works just fine. But I figure maybe I need to provide a package name, and trypipx install -e --spec ~/projects/foo foo
despite the redundancy. This churns away for a while, and spits out:Which is patently false. At this point I find #108 and #126 which seem to indicate that
--editable
isn't really supported. I still don't really understand what's going on, though.It seems like pipx can't install my package, so I instead create a virtualenv manually and symlink the installed script into
~/.local/bin
.I hope that my recounting of this experience may suggest some changes to the
pipx
interface or documentation which could avoid such unintuitive, frustrating, and arguably dangerous behavior.The text was updated successfully, but these errors were encountered: