0

with pip, I install a script in editable mode

pip install -e .

ok, and uninstall with

pip uninstall myscript

ok, but if I try use the uninstalled script, I get

pkg_resources.DistributionNotFound: myscript==0.0.1

why the script is not fully removed ?

JuanPablo
  • 23,792
  • 39
  • 118
  • 164
  • Does this answer your question? [How to uninstall editable packages with pip (installed with -e)](https://stackoverflow.com/questions/17346619/how-to-uninstall-editable-packages-with-pip-installed-with-e) – aless80 Mar 25 '21 at 15:56

1 Answers1

0

I find the issue en the pip repository pip uninstall does not properly cleanup bin scripts (for non-pip installs) .

and I solved with a change in the setup.py

--- a/setup.py
+++ b/setup.py
@@ -12 +12,5 @@ setup(
-    scripts=['bin/myscript'],
+    entry_points={
+        'console_scripts': [
+            'myscript=bin:main',
+        ],
+    },

and the name of script

renamed:    bin/myscript -> bin/__init__.py
JuanPablo
  • 23,792
  • 39
  • 118
  • 164