4 ms·
Maybe I just never do anything complicated with Python, but I never have any the problems captured in this comic. I install all my Python modules into the syst
by kingofpandora 8y ago
Maybe I just never do anything complicated with Python, but I never have any the problems captured in this comic.
I install all my Python modules into the system's Python using my OS's package manager. I have both Python 2 and Python 3 installed but beyond having the same module installed in each of those locations, I have never found the need for multiple versions of the same module installed at the same time.
On the rare occasion where my OS doesn't provide a package I need, I use pip install --user. If it turns out to be something I'll want for the long term, I just knock together a quick package that I can install/uninstall using standard OS packaging tools.
- coldtea 8y ago>I install all my Python modules into the system's Python using my OS's package manager. If that's the case, then it's as you said: you "just never do anything complicated with Python".
- gkya 8y agoMost of the time the language package manager for a very popular language is an overkill. You can get all the packages you need for web development, AI or statistical/mathematical stuff in python from say debian packages and build arbitrarily complex applications. And you have the additional benefit of being able to easily package your application for many distributions that package stable versions of popular libraries for languages like python, perl, ruby, etc. Another additional benefit is that because most of the time you fetch packages precompiled, you don't need to run probably insecure compilations on your system (many popular packages for Python for example require you to compile C extensions). And the trade-off is quite palatable: you use the APIs hygenically, don't do things like leftpad, and sometimes forego some cutting edge features (and many dynamic languages enable you to easily backport them without modifying the package itself most of the time).
- Chyzwar 8y agonot really the case if you work in a team or deploy your application.
- gkya 8y agoUnless you streamline the development and deployment environments, that is. You can just work in a VM, a chroot/jail, or probably use Docker (I haven't ever used it tho, thus not sure).
- Chyzwar 8y agosoner or later you will need to solve the same set of issues that virtualenv and pipenv try to solve.
- gkya 8y agoThen I can reach for virtualenv and pip. I did not mean that package distribution and management in itself is an overkill, but that many types of projects just don't need these tools. And if one has to use these tools for all projects and from the get-go, then that means the library ecsosystem is unhygienic and/or the devs are not really responsible on how they use the APIs.
- pwang 8y ago> You can get all the packages you need for web development, AI or statistical/mathematical stuff in python from say debian packages Um... not quite that simple. If you are just developing for yourself, and you have full control over the deployment environment, then of course things are quite simple. (Assuming you don't need to track a fast-moving ecosystem, like machine learning, where packages update constantly and there is a huge rat's nest of interdependencies between OS, kernel, hardware drivers, and algorithmic libraries.)
- coldtea 8y agoAgain, those do not concern complicated things with Python. You might program very complicated algorithms in Python, but you don't anything complicated with them (shipping them to customers, supporting 100 servers, different distributions, and so on).
- kingofpandora 8y agoHow would you define "complicated"? Does it go beyond having different versions of the same Python module installed?
- coldtea 8y agoIt can go way beyond that. Different Python versions for legacy programs, Python servers and mass deployment via dev-ops, creating Python RPMs or Debs or other packages to ship to clients, and many other cases besides...