Open reynoldsnlp opened 5 years ago
Maybe amend the error in this case to say Can't uninstall 'spam' (found in current directory). No files were found to uninstall.
?
@pfmoore I think your edited message is definitely an improvement (and would have saved me some time), but I would go even further. What about something more instructive, like Can't uninstall 'spam' (in current directory). No files were found to uninstall.\nTo uninstall 'spam' from the system library, run the same command from a directory without a 'spam' directory.
(and change system library
if there is a more precise term). Is that too verbose?
It seems like the only time someone would ever bump up against this message is if they were in a similar situation to me. I may be wrong, but uninstalling from the current directory like cd path/to/site-packages && python3 -m pip uninstall spam
seems like a marginal use case, and if someone knows enough to be doing that, then a message tuned for mouth-breathers like me will not confuse them.
It seems that most users just assume – like I did ;-) – that uninstall
is going to magically go find the package in the system library.
Maybe 'your computer' would be better than 'system library'?
Iteration on your suggestion @reynoldsnlp :
Can't uninstall 'spam' (in the current directory). No files were found to uninstall.\nTo uninstall 'spam' from your computer, run the same command from a directory that does not contain a 'spam' directory.
Is it clearer?
I have an issue related to this one. With pip list
I get also the package in the current working directory, which makes sense because it is available there. However to make clear that the version of the current working directory is recognized a comment in the output of pip list
would be helpful.
With pip list I get also the package in the current working directory, which makes sense because it is available there.
After change in https://github.com/pypa/pip/pull/7955 you should not get this package unless your PYTHONPATH includes current working directory.
Environment
Description
I installed a local package,
spam
, usingpython3 -m pip install --user .
. If I try to uninstall my package when the package folder is in the current directory, I get the following:The uninstall completes successfully when I run it from a different directory:
Expected behavior I did not expect
uninstall
to be sensitive to the contents of the local directory. If this is the expected behavior for technical reasons, I would change thestderr
messageCan't uninstall 'spam'. No files were found to uninstall.
to be more helpful in indicating that the failure could be because there is a local folder with the target package's name.