Way to build isolated Python Deployment Environment-s.

Now obsolete, replaced with venv? But even that is semi-obsolete? Stefano Borini: Current Status of Python Packaging - 2019: I assume you are a programmer and wants to start developing a python package:

  • Create your development environment with Poetry, specifying the direct dependencies of your project with a strict version. This way you ensure your development (and testing) environment is always reproducible.
  • Create a pyproject.toml and use poetry as a backend to create your source and binary distributions.
  • Now it’s time to specify your abstract package dependencies. Specify them with a minimum version that you know your package can work with. This way you ensure you don’t create needless version conflicts with other packages.

Or maybe it's still not that simple. pyenv, poetry, asdf....

2024: going to following this recipe: (2023-03-27) BiteCode on Python installation and packaging esp on Mac

With pip and Django

Aug'2010: I have it in /documents/djcode/pinax-env/ - for Pyramid and WebPy have one in /documents/djcode/st/

  • cd into there
  • type source bin/activate

Feb'2014: changing a virtualenv to use python 2.7 instead of 2.6.

$ which python
$ which python2.7
$ virtualenv -p /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 st (<path/to/new/virtualenv/>)
$ cd st
$ source/bin activate
$ python
> python2.7 - yay!
$ python
> No module named web - boo!
$ sudo pip install --upgrade
> (can now launch - and get good page from browser)
$ pip install --upgrade selenium

Sept'2017: point-upgrading python v2.7 - see OpenSSL page

Edited:    |       |    Search Twitter for discussion