Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing python module installed in develop mode

Hi I was trying the python packaging using setuptools and to test I installed the module in develop mode. i.e

python setup.py develop 

This has added my modules directory to sys.path. Now I want to remove the module is there any way to do this?

Thanks in advance

like image 288
copyninja Avatar asked Aug 31 '10 06:08

copyninja


People also ask

How do I uninstall Python Setuptools?

Uninstalling. On Windows, if Setuptools was installed using an .exe or . msi installer, simply use the uninstall feature of “Add/Remove Programs” in the Control Panel.

What is Python setup py develop?

For your own stuff, you want to first install your package and then be able to frequently edit the code without having to re-install the package every time — and that is exactly what python setup.py develop does: it installs the package (typically just a source folder) in a way that allows you to conveniently edit your ...


2 Answers

Use the --uninstall or -u option to develop, i.e:

python setup.py develop --uninstall 

This will remove it from easy-install.pth and delete the .egg-link. The only thing it doesn't do is delete scripts (yet).

like image 102
PJ Eby Avatar answered Nov 07 '22 07:11

PJ Eby


Edit easy-install.pth in your site-packages directory and remove the line that points to your development version of that package.

like image 33
Zooko Avatar answered Nov 07 '22 09:11

Zooko