r/learnpython • u/AlexKingstonsGigolo • Feb 12 '21
Python Seems Broken To Me As A Language/Distribution; Perhaps You Can Set Me Straight
While this is a bit of a rant, a rant often means the ranter is missing something important which nobody has bothered to make clear to them. So, I hope you will indulge me and point out where I have gone wrong.
Anaconda: As far as I can tell, someone decided to make a wrapper for
pipsimply because they thought typingpipwas somehow beneath them and preferred typingconda. This project seems to serve no other purpose than to act as a substitute forpipor, if not, the additional benefits of Anaconda appear to be negligible. What have I missed?Pyenv: How hard is it to either type the name of a python binary or create a sym. link to a particular python binary with a distinct name and then type that?
pyenvseems to be nothing more than a desire to complicate an otherwise-simple situtation.Virtual environments: If you are so scared your project might interfere with something else to the point you feel compelled to isolate the packages with a virtual environment, you have likely structured your project wrong. I have worked in software for over twenty years in C, C++, C#, python, VB.net, JavaScript, TypeScript, Haskell, etc., etc., etc. and the only time I have ever had to work with projects where someone utilized the idea of a virtual environment, or analog thereof, have been python projects. Every other language allows you to easily structure your project and isolate libraries in a way which does not involve such potential system-wide shifting of the ground from underneath the developers' feet. In my opinion, running
venvshould only print a message to standard out which reads "You have done something wrong; review your project plans."Documentation: While this problem is not unique to python, I tend to find issues in python-project documentation more than any other language; maybe this is a testament to the popularity of the language, in which case "good for you but bad for many people, like me, trying to do something". Installation is as simple as "pip install blahblahblah"; great, what if I want to uninstall or reinstall or what if something was working before and now, for no obvious reason, python is raising exceptions which make no sense? For example, suppose I receive an import error "dlopen(foo.so, 2): library not loaded: absurdlyCrypticName.dylib; referenced from foo.so; reason: image not found"; this is not helpful. I have no idea what was tried. I have no idea what the context was in which such a try was attempted. I will likely have no idea how to resolve the issue even if I can somehow discern what sort of library is involved with "absurdlyCrypticname.dylib"; yes, I could try
pip install ...and yet many times that doesn't work. Web searches often turn up nothing useful and hours, if not days, are wasted trying to figure something out with respect to an otherwise useful tool which could have been avoided if someone thought to use a reader-friendly name for the library, to give a bit more than a single line of context into a binary file, and to give some suggestions.
Maybe I am the only one who feels this way. Maybe I am too stupid to do a job I have been doing quite well for over two decades. Maybe every other developer is a psychic who sees no problem with their projects being structured poorly and who is insulted by the name "pip". Maybe it really is just me.
7
u/StandardAir Feb 12 '21
This post gives me the impression you are being told to use these tools rather than picking them up by choice?
Why do I think this? You are describing things like conda, pyenv, and even virtual envs as if they are essential for working with the language. They are not.
If you don't like Anaconda, don't use it. Although I'm personally a big fan of miniconda rather than the full distribution, but it's hardly required. Most Python users, especially outside data related domains, have likely have never touched it.
Again, not required. I use conda to manage my Python distributions, but if you find sym links satisfying, what is stopping you?
Yep, activating a virtual environment is often an extra command. Since I'm frequently shifting Python versions with conda along with my installed packages, it's no different than using nvm to manage my multiple node environments, so I don't think much of it.
This probably reflects more on the domain and tools you are working with. The quality of the official Python documentation was a big draw for me when I first began using it 10 years ago. Much of this section sounds like a reflection of a more specific frustration. I'm not familiar with Haskell or VB, but of all the other languages you mention experience with, I've had the same problems you describe. It's always made harder when you are first learning something.
If the language itself is really that much of a problem, you always have a choice, and are free to move on. There are plenty of dev jobs out there using the other languages you described. Personally, I like Python. Writing in it makes me happy. However, if it doesn't check that box for you, focus more on trying to find something that does.