3 ms·
Isn't making Python easy to deploy a pain point for people though? It is for me.
by zitterbewegung 9y ago
Isn't making Python easy to deploy a pain point for people though? It is for me.
- toyg 9y agoDepends what you mean by “deploy”. Some use cases are very simple. As always, it’s about trade-offs.
- xapata 9y agoWhat specifically is difficult? The folks at Anaconda can probably help you. Use the conda package manager.
- takeda 9y agoIt is easy, just use setuptools and create your own setup.py then ./setup bdist_wheel and you have a single easy to deploy (pip install <package>, or put in an internal PyPi repo) package. I especially encourage to use virtualenv too keep your application completely disjoint from the rest of your system. It really helps when in the future you decide to upgrade the OS.
- kalefranz 9y agovirtualenv keeps pure-python code isolated from other python code associated with that interpreter. Any python code that makes use of c libraries and other system libraries is usually not isolated. In fact it can be quite leaky and cause all sorts of difficult to identify problems.
- toyg 9y ago> Any python code that makes use of c libraries and other system libraries is usually not isolated. What? As long as you compile it in the virtualenv, it is. And now with wheels that's basically the case for any modern library. Yes, you will share the C libraries in stdlib, but if you really want you can isolate those too.
- jimnotgym 9y agoI often write little helper apps for our business. If I want other people to deploy them they want a windows exe to run, because thats what they are familiar with. Not just your average user, but also lots of IT support have no knowledge whatsoever of tech that wasn't on their Microsoft course. Being able to package as an MSI or exe is a fundamental requirement for adoption of Windows client side applications.
- takeda 9y agoNever used it myself, but if you use setuptools, you should also have bdist_wininst target (e.g. ./setup.py bdist_wininst) which supposed to create a windows installable package. The nice thing with using setuptools is that you can create different distributable package types depending on the need.
- toyg 9y agoThere are a few options for that particular case - typically PyInstaller and cx_freeze. But I agree that the EXE story on Windows is still suboptimal; hopefully now that wheels are becoming mainstream, better solutions will appear. My gripe is not with that sort of deployment, but rather the web-related stuff. Lack of boilerplate is a big part of what makes Python attractive for web development, if they start ramming EARs down my throat I'll be very sad.