Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wow, this is super obvious (so obvious that it wouldn't occur to me to write a post to brag about it), yet it somehow didn't occur to me. Very cool.

Not so long ago I started pip-installing my scripts to keep things tidy. It seems now I can regress back to chaos again...



My favorite way to pass small scripts to non software colleagues:

    try:
       import package
    except ImportError:
       import pip
       print("Installing package...")
       pip.main(['install', 'package']
       import package
:D




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: