4 ms·
I've said it before, I'll say it again. When all of the major Linux platforms provide the same pre-built Python 3 packages for the packages I use, I'll make the
by falcolas 11y ago
I've said it before, I'll say it again. When all of the major Linux platforms provide the same pre-built Python 3 packages for the packages I use, I'll make the migration. Until then, it's just easier to stay on Python 2.
Yes, I could build the packages/wheels myself. Yes, I could install a compiler on the target machine and let the binaries build from scratch. I won't, however, since it's a lot of time for remarkably little benefit. Python 2 is still well supported, and is a great language to program in.
Yes, Python 3 has cleaned up some of the rough edges of Python 2; but the improvements are still not significant enough to offset the cost of porting libraries and building packages.
- maweki 11y agobut for node we expect everyone to install/build from source an not use the supplied packages because they are ancient, in comparison. Which distribution doesn't ship python3.3?
- falcolas 11y agoMost ship python 3.3, but most of the libraries which the distro provides pre-compiled are not Python 3. e.g. python-mysql python-django python-keyczar python-pyhsm > but for node we expect everyone to install/build from source an not use the supplied packages This is not necessarily an improvement in the state of packaging. Verifying that unsigned source code has not been changed is a hard problem (which NPM has not yet solved). Installing compilation tools and extensive header files on a production machine opens up a new class of security vulnerabilities on that machine (whether a VM, container, or bare metal).
- eeZi 11y agoThere's Anaconda too: https://www.continuum.io/why-anaconda https://www.continuum.io/why-anaconda Many companies use it to run a recent Python stack on any Linux distro they like.
- meej 11y agoAnaconda was the easiest way for me to get Python 3 running on my Slackware instance. I am very pleased with it.
- mcguire 11y ago"Yes, I could install a compiler on the target machine and let the binaries build from scratch." Are we talking about the same Python?
- falcolas 11y agoYes -- specifically packages with c shared libraries. The kind you get when installing bcrypt, python-mysql, or any number of libraries with optimized binaries.
- voltagex_ 11y agohttps://github.com/codeinthehole/django-in-a-deb-file https://github.com/codeinthehole/django-in-a-deb-file is an interesting solution
- collyw 11y agoDon't you use a virtualenv? There are benefits beyond having up to date packages and its not especially complicated (I am guessing it would take an hour or two to learn).
- falcolas 11y agoYes, I know about virtualenv. I also know it still requires either having pre-compiled wheels, or a compiler on the frontend. Same problem, a bit better isolated from system packages.
- orf 11y agoIs it so hard to do an 'apt-get install build-essential'? It seems a bit silly to stay on only system packages when a 'apt-get install mysql-dev && pip install pymysql' gets you a fresh up to date Python 3 (or 2) package in your virtualenv. Heck, if managing a bunch of virtualenvs is too much install virtualenv wrapper and just use 'mkvirtualenv yourproject'.
- Ologn 11y agoI alternate between 2 and 3 depending on the system, but I am like you as well - me using 2 has nothing to do with philosophical differences and all of that, it has to do with my Linux distribution having more python2 packages than python3 packages.
- mixmastamyk 11y ago> install a compiler on the target One solution, build on your dev machine and produce distro packages instead.