4 ms·
This makes a lot of good points, but some bad ones. Esp. the "installing python" one. Just use your package manager to install all the versions you need. And
by rmc 15y ago
This makes a lot of good points, but some bad ones.
Esp. the "installing python" one. Just use your package manager to install all the versions you need.
And for "Packaging and Dependencies", just use pip.
- engtech 15y agoI agree that people should use a good package manager, but the reality of the corporate env world is that you'll be trying to use the latest Python on some ridiculously old unix install without root access, and you'll never be able to get IT to install the latest for all users.
- joshbaptiste 15y ago+1 for you sir, we are constantly fighting with Unix admins who refuse to install anything but the generic terribly old 2.3 - 2.4 Python versions that are bundled with their default enterprise Suse packages, which only leads to full /home issues since everyone just downloads their own versions, compiling extensions manually.
- antoncohen 15y agoOr you could write the applications for the systems they will run on. Why develop in the latest Ubuntu with Python 2.7 when you know your company runs RHEL 5 or SUSE with Python 2.4? I know it was annoying how long RHEL lasted with Python 2.4, but now the latest RHEL, Debian-stable, and Ubuntu LTS all have Python 2.6, so write to Python 2.6 if your company uses those OSs, there's not excuse to write incompatible code targeted at Python 2.7. In many Linux distributions it is impossible to replace the Python version, core parts of the OS like package management will break. It is possible to install another version in parallel and use "virtualenv --python=" to use it for an application. If you are using RHEL/CentOS 5 you can install the python26 package from the EPEL repository.
- tbatterii 15y agoWhat's the package manager for windows? Mostly I agree with you, but installing python on windows is a PITA compared to *nix. PIP works until you need something that requires compiling extensions which is also a PITA on windows. IIRC easy_install can install binaries, but I could be wrong about that since I don't do windows development anymore and thus pip works for me 99% of the time. Regardless, my point is, though I think we all wish it was as simple as using your package manager and pip, it simply isn't that way for everyone. And it probably never will be, but we can always make it simpler. :)
- rmc 15y agoI would not use Windows for servers.
- j_baker 15y agoNeither would I. But some people are stuck in jobs where they have to support Windows. If that's never been the case for you, consider yourself lucky.
- tbatterii 15y agoneither would I. but I'm not pretending they don't exist to prove a point :) Whether you or I prefer it or not, there are lots of people who either by choice or not develop on windows and in some cases deploy to windows servers. And for those people, things aren't as simple as "use the package manager and pip" no matter how much anyone would like it to be. reality sucks.
- d0mine 15y agoPIP works until you need something that requires compiling extensions </quote> You could use *.exe installers such as http://www.lfd.uci.edu/~gohlke/pythonlibs/ http://www.lfd.uci.edu/~gohlke/pythonlibs/ Advanced users could use mingw to compile extensions.
- tbatterii 15y ago"You could use *.exe installers" yeah I know, but then you aren't using PIP, and how's that work with virtualenv? Again, not as simple as some would have you believe.
- j_baker 15y agoWhat if your package manager doesn't support the version of Python you're targeting? The most common place this happens is if you have some old RHEL 5 boxen that haven't been upgraded (and who that uses RHEL doesn't?). Or suppose you use python 2.7, which isn't supported by very many (any?) "stable" linuces (aka Debian stable, RHEL, Ubuntu LTR, etc). And installing packages into the system python (if that's what you're suggesting) is the path to madness. It's much better to use virtualenvs you can throw away at will. All in all, it's usually best just to leave the system Python alone to avoid causing problems with any other packages that may depend on it being in a consistent state.
- mindrunner 15y agoThis problem really echoed with me. The one thing I hate about Python is the pain of compiling it from source. Unlike startups, we enterprise dudes don't have the liberty of choosing the latest distros with better base Python versions.in some cases,the machines don't even have a compiler installed. Try running your funky new admin script on these rhel5 boxen is a pain. I've resorted to compiling with LD_RUN_PATH, -rpath & -r set. I think this should be included in the python-guide for the sanity of other devops dudes