pipm: pip install to local-packages and pip run

k4ml profile image Kamal Mustafa Updated on ・2 min read


Look like there was already previous effort on this, there's even PEP being written in form of PEP582! But discussion on it seem to stop around May this year, look like everyone seem have gave up :(

Aside: I don't know there's Discourse forum at discuss.python.org!

Also, other than the PEP's implementation as branch in CPython, there's also python implementation called pythonloc by Chad Smith. Turn out he's also the author of pipx, tools that I have started to use recently.

********** #### ***********

Following previous post, I wrote a simple wrapper to commands used in the write up. I called it pipm, as a play to word npm.

This little pipm tools allow me to do something like:-

pipm install django
pipm run django startproject mysite .
pipm run python manage.py runserver

I don't know how far this little tool can go. Past experience has shown that there will be lot of edge cases that can't be covered and result in what we can call leaky abstractions.

But at the same time, pip has evolved a lot and it surprised me that this actually seem to work. Oh wait, I haven't try yet with editable packages, sigh ...

Btw, the repo is here - https://github.com/k4ml/pipm. Feel free to try and give feedback.


Editor guide
k4ml profile image
Kamal Mustafa Author

A couple of tools seem to surface recently that implement PEP582:-

And some more discusssion:-