I have a custom Python module I want to use in another project. I have two options:
- Add a
setup.py
and install the module locally withpip
. - Add the location of the module to the
PYTHONPATH
environment variable.
What are the tradeoffs? I know instinctively that using pip
with a setup.py
should be preferred, but can’t point to any concrete evidence why.