5 ms·
Python is deceptive. They lure you in with its simplicity, and then one day you want to deploy your software and you realize that it's more complicated than any
by gypsyharlot 5y ago
Python is deceptive. They lure you in with its simplicity, and then one day you want to deploy your software and you realize that it's more complicated than any other programming language ever conceived of.
- pansa2 5y agoYes - this is the reason I've switched to Go for writing command-line apps. I don't like Go as much as Python (Go is simpler, but not as easy), but being able to compile a self-contained executable is huge. It's also great to have access to GIL-free parallelism. I don't expect Python to support either of those things any time soon.
- dijit 5y agoBecause of dependency management, or?
- dagw 5y agoBecause of having to know what WSGI and ASGI are and picking the right one. Then pick which implementation of the above you want to use. Then configuring it correctly for your app. And finally make it play nicely with nginx/apache/whatever. If on the other hand you're trying to deploy a desktop app, that is an entirely different kettle of 'fun'.
- aitchnyu 5y ago<dream> There is a very fast Gunicorn replacement in Rust that accepts an wsgi/asgi module and a static dir and starts serving both. It breaks performance barriers for pure Python servers. It can automagically create systemd service and nginx site or just exist as a Docker entry point.
- maccolgan 5y agoThat's not really a criticism of Python, is it? What do you want? One Way To Do Things with No Configuration with magical compatibility with nginx/apache/whatever ?
- badsectoracula 5y agoWell, according to the Zen of Python "there should be one- and preferably only one -obvious way to do it" :-P
- dragonwriter 5y ago> Because of having to know what WSGI and ASGI are and picking the right one. Then pick which implementation of the above you want to use. Then configuring it correctly for your app. And finally make it play nicely with nginx/apache/whatever. None if the Python in I deploy has to deal with any of that, all of which applies in a very narrow particular application domain. Even if it was a source of valid criticism, it would only be of using Python for that specific use, not generally.
- akmittal 5y agoWhat kind you issues you get during deployment? I think if running on right version then there should not be any issues.
- gypsyharlot 5y agohttps://stackoverflow.com/questions/52187362/how-to-deploy-python-script https://stackoverflow.com/questions/52187362/how-to-deploy-p... Some of these approaches work for Windows, others for Mac, some for Linux, depending on versions of Python that are installed, etc. You can get around some of the problems with pyenv and a bunch of other tools.
- ido 5y agoI was originally using python (learned it in my first job back in 2001!) & that was the reason I eventually moved to other languages - python as a language is great but the tooling/ecosystem isn't for exactly these issues (or at least weren't at the time, that's also at least a decade+ ago by now). My impression at the time was that using it for server side stuff was fine (i have control of the server and simply install all the right things/versions myself) but packaging it up for end users to install on their desktops/mobile was a huge pain, there was no real easy/simple way to just export a self running installer that you double click (on windows/mac) or an IPA/APK (on ios/android) and end up with a running program the way users were used to from e.g. a bundled .net (at the time using mono, now ms provides cross platforms .net implementations themselves) or native c/c++ executable.
- DemocracyFTW 5y agoThis is a solved problem. The community provides a handy system overview[^1] that should be good enough for most cases. [^1]: https://xkcd.com/1987/ https://xkcd.com/1987/
- SteadBytes 5y agoDidn’t even need to open the link to know what it was, thanks for the laugh!
- agumonkey 5y agoIt's probably the most voiced complaint these days, unless core devs are deaf, I bet ten solid dollars they're gonna address that soon.
- jshen 5y agoIt’s been like this for over a decade. I wouldn’t hold my breath. By comparison, I’m pretty sure the Ruby community adopted bundler over a decade ago.
- agumonkey 5y agoMaybe they were busy on other things. Py3k, async. Now these are settled I don't see what other defect needs to be worked on
- askvictor 5y agoI don't know; I've just written something in .net/c# and it's pretty bloddy difficult to deploy.
- gkbrk 5y ago.NET can export self-contained single-file executable that doesn't require any runtime on the target computer/server. Python has solutions like PyInstaller, but it's not built-in and requires building on the same system. In .NET, you can use the built-in tools to export binaries for Linux from Windows.
- byteface 5y agoMost windows users have at least 4/5 versions of linux installed on their machine so it's a non issue. They have wsl, a base installed partition, vagrant, a VM and probably docker containers. so running one extra command to gen a windows package isn't a big deal.
- askvictor 5y agoExcept when you have some specific dependencies/targets that make this difficult. I'm sure I'll get there eventually, but I chose .net for this thinking it would be dead simple, and yet here I am wading through documentation and stackoverflow posts to get to my self-contained single-file executable.
- rowanG077 5y ago.net/C# was one of the easiest to deploy in my experience. Just build a self-contained executable and you're done.
- salex89 5y agoWouldn't say it better myself. Everything you gain with fast coding you lose on tackling performance issues, GIL, dependency management... Things harder to solve once you're committed to production.
- peakaboo 5y agoIt depends very much on what you are doing. Python for big complicated applications is a No for me also but python for extraction jobs in a ETL pipeline or data science tasks is a huge YES.
- deleted 5y ago[deleted]
- matkoniecz 5y agoCan you be more specific about your claims? What is wrong with Python? > more complicated than any other programming language ever conceived of is definitely untrue. Even if you take only mainstream languages then there are many more annoying to deploy, ones that are more complicated and so on.
- jshen 5y agoDependency management in python is much worse than most mainstream languages.
- matkoniecz 5y agoHere I agree, but it is quite far away from > more complicated than any other programming language ever conceived of
- gypsyharlot 5y agoIt was far easier for me to grok monads in Haskell (and it took less time), than to learn how to properly deploy a Python application. Given that monads are often a complaint and testament to the "complexity" of Haskell, I think it's unfair to make the claim that Python is uncomplicated. If you use a language for some period of time, it is very likely that you will have to deal with the tooling at some point.
- eesmith 5y agoI think the "it's" in "it's more complicated" refers to deploying software, not the language itself nor its support packages.
- tigr 5y agoHave you ever tried to deploy an Erlang/OTP application? I find it much harder to do
- vland 5y agoNo, but Go and C++ are much easier to deploy.
- deleted 5y ago[deleted]
- rcarmo 5y agoThis comment is deceptive. This is a solved problem with virtualenvs. It is why Piku (https://github.com/piku https://github.com/piku) can deploy isolated apps with ease (and actually devotes less than 80 lines of code to the actual Python deployment).
- gypsyharlot 5y agoThanks for taking the opportunity to advertise your own product, but it doesn't solve the problem.
- rcarmo 5y agoIt’s not a product. It’s an example of why it isn’t a problem, and it was actually _designed_ around virtualenvs, which is why it’s just a single script (again, not a product).
- globular-toast 5y agoWhen you say "deploy" do you mean "put it on a webserver"? I've deployed python Web services on to very limited environments that have nothing more than an interpreter. Nowadays I use pip-tools and docker which makes updating trivial. Do you perhaps mean distribution as an app? I've had luck with pyinstaller. There can be fiddly bits but overall it's pretty smooth. It's easier if you are targeting a system with an interpreter, like a Linux distro. Overall I just think you need to know what you're doing. I don't really think this is a bad thing. Maybe you could elaborate on what your difficulties are? From here I just don't see how it's more difficult than anything else.
- gypsyharlot 5y agoRead and learn: https://sedimental.org/the_packaging_gradient.html https://sedimental.org/the_packaging_gradient.html
- globular-toast 5y agoThanks, I know all of that. What made you think I don't?
- mrlonglong 5y agoI recently wrote a python script to handle serial communication and uploading of a bare metal binary to my RPi3, this saves me so much time debugging now that I don't need to swap SD cards continually. Excellent tool.