How to clear my python packages using pip3 or any other way?

this is my setup.py file for installing my python program, after installing using python3 setup.py install entry in my program was created with the name testmain , when I did pip3 freeze , it showed abc==0.1 in its output, so I deleted it with pip3 using pip3 uninstall abc , although the packages were removed, there was still a testmain entry in my path, is there a way that pip3 also deletes this entry during uninstallation or in any other way that I can uninstall my programs in the same scenario?

 from setuptools import setup setup(name='abc', version='0.1', description='test', url='http://github.com/rjdp', author='rajdeep', author_email=' rajdeep.sharma@rtcamp.com ', license='MIT', packages=['cli'], install_requires=[ 'cement', ], entry_points = { 'console_scripts': ['testmain=cli.abc:main'], }, zip_safe=False) 
+5
source share
1 answer

Instead of installing python3 setup.py use:

 pip3 install . 

then

 pip3 uninstall abc 

This will remove the testmain.

I had the same question today, and I spent all morning trying to figure out why the script would not delete. Nothing worked until I saw Ramana answer here: https://askubuntu.com/questions/38692/how-does-one-remove-applications-installed-through-python-setup-py-install

"You should always install Python applications using pip. Pip supports the uninstall option." and an example in commment about how the local path is supported.

+8
source

Source: https://habr.com/ru/post/1216454/


All Articles