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

virtualenvs, and outside of those taking care to always have proper

    #!/usr/bin/env pythonX 
lines at the top.


virtualenvs? can you please elaborate



How is this a treat not clear it's not straightforward and not obvious as to how to switch back-and-forth between 2.7 and 3.5 why are there two dangling versions


for projects you only use with one Python version, you have a virtualenv per project, with the right version, and enable the virtualenv when you work on that project. (or you only do that for the python version you use less, but virtualenvs have more benefits than just managing python versions). If you need to test something with two versions, you have one env per python version and enable whichever one you need.


How do you switch back-and-forth


From the page I linked:

> To begin using the virtual environment, it needs to be activated:

> $ source my_project/bin/activate


I'm just looking for the gist or the recipe for virtual env switching back-and-forth




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

Search: