0

When exactly should I use either pip install -e or python setup.py develop in my project? is it always necessary to do one of them? can't I just work with the scripts themselves as they are?

related to "pip install --editable ./" vs "python setup.py develop"

ihadanny
  • 4,377
  • 7
  • 45
  • 76
  • What exactly do you want to know beyond what is explained in the other question? – mkrieger1 Feb 16 '20 at 11:30
  • The purpose of the `develop` command (and it also addresses `pip`) is explained here: https://stackoverflow.com/questions/19048732/python-setup-py-develop-vs-install – mkrieger1 Feb 16 '20 at 11:50
  • It is not in general necessary to use it. If you can work with your code without using it then it is not necessary for you. – mkrieger1 Feb 16 '20 at 11:52
  • @ihadanny mkrieger1 already answered: use it when you need it, there is no obligation. Now, more of an opinion than an answer, from my point of view: you should always use the `src` project directory layout (one discussion on this [here](https://blog.ionelmc.ro/2014/05/25/python-packaging/)), and then it will become obvious that you need the _develop_ or _editable_ mode when working on your project. – sinoroc Feb 17 '20 at 09:39

1 Answers1

-1

You have to use them only when you need to import something from a sibling folder or any other import problems.

Take a look at this thread

Mohammad Jafari
  • 1,742
  • 13
  • 17