
On 02/22/2017 07:08 AM, Phil Mayers wrote:
On 22/02/17 11:12, Glyph Lefkowitz wrote:
I'm tempted to launch into a diatribe about namespacing, containers, and application isolation generally, but before I do - why is it that you /want/ to use the system Python environment? Had you just not considered the option of virtual environments?
Awesome though it is, virtualenv can be very tedious if you need to install hundreds of megabytes of compiler and -devel packages. System packages are attractive precisely because you can avoid this.
Have you considered the 'conda' package manager? https://conda.io/docs/index.html If not, and for the benefit of others (I'm amazed it's not mentioned on this list) here is my conda rant: TL;DR: use conda. IMO, conda is superior to pip/wheels. The Python packaging orthodoxy's story is "oh, yes, conda -- that solves a different problem ..." which seems disingenuous to me. Conda was originally created by Continuum Analytics to solve the Numpy/SciPy packaging problem(s), which it has done with brilliant success. Conda has its own kind of packages, but they are relatively easy to create (I can do it, proving that anyone can ;) both for your own packages and for PyPI packages -- see: https://conda.io/docs/build_tutorials/pkgs.html Conda is a system-level package manager in the sense that it can install any package, including Python itself, and creates its own type of 'virtual environments' with their own Python versions (which it will install). Conda does a great job of keeping non-Python libraries that Python packages depend on isolated from system libraries. If the version of a Python package you want to use depends on a later version of a library that exists on your system, conda will install the required version of the library in the virtual environment, keeping it separate from other versions of that library on your system. The latest version of Twisted is available from the main conda package repository and is well supported. I am developing an application with many dependencies, including Twisted, PyQt5, pythonOCC (a massive python-wrapped C++ 3D CAD library), and many scientific libraries, and conda is the only Python packaging and distribution technology that can support my app -- I would not even begin to attempt it using pip. I've also used conda to manage large Django applications. After I showed conda to my sysadmins at work, they jumped on it and now use it for all Python installations on our servers. They will never have to compile Python again! I do all my development on an Ubuntu 14.04 laptop and use conda for everything Python on my machine. Cheers, Steve