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

You don't have to activate the environment. I never do; it's a strictly optional convenience (it you think it's convenient).

Instead, simply run the interpreter installed in the environment when you run your app, e.g. "./my_env/bin/python my_app.py", and things will just work. No activation required, no special mode, nothing to forget.

The part about requirements.txt and installing packages could also be simplified if you did it the other way around: install first and create the requirements file from that:

  $ python3 -m venv my_env
  $ my_env/bin/pip install some-dependency
  $ my_env/bin/pip freeze >requirements.txt
  $ my_env/bin/python3 my_app.py
There you go. Setup, install and run in four steps and zero modes.


That's literally one step more, than Maven.

That's before you get to package your app...




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: