Netro Netro - 7 months ago 68
Python Question

Python setup.py develop vs install

Two options in setup.py

develop
and
install
are confusing me. According to this site, using
develop
creates a special link to site-packages directory.

People have suggested that I use
python setup.py install
for a fresh installation and
python setup.py develop
after any changes have been made to the setup file.

Can anyone shed some light on the usage of these commands?

Answer

python setup.py install is used to install (typically third party) packages that you're not going to be developing/editing/debugging yourself.

For your own stuff, you want to get your package installed and then be able to frequently edit your code and not have to re-install your package—this is exactly what python setup.py develop does: installs the package (typically just a source folder) in a way that allows you to conveniently edit your code after its installed to the (virtual) environment and have the changes take effect immediately.