r/learnpython • • 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.

  1. Anaconda: As far as I can tell, someone decided to make a wrapper for pip simply because they thought typing pip was somehow beneath them and preferred typing conda. This project seems to serve no other purpose than to act as a substitute for pip or, if not, the additional benefits of Anaconda appear to be negligible. What have I missed?

  2. 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? pyenv seems to be nothing more than a desire to complicate an otherwise-simple situtation.

  3. 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 venv should only print a message to standard out which reads "You have done something wrong; review your project plans."

  4. 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.

0 Upvotes

12 comments sorted by

View all comments

Show parent comments

1

u/TangibleLight Feb 12 '21

I like how they say virtual environments and conda are useless, then complain about package installation issues.

0

u/AlexKingstonsGigolo Feb 13 '21

Excuse me; where did I complain about package installation issues? Every non-trivial software package is liable to have issues; I think nobody disputes that fact. My objection there is with the messages when the issues arise; specifically, the lack of helpful information.

2

u/TangibleLight Feb 13 '21 edited Feb 13 '21

When there are files missing or not loadable after you install a package, that's a package installation issue. Those are the kinds of things that conda intends to make more reliable. Sure, there can be issues despite that, but no packaging system is perfect. Conda does a pretty good job in dealing with binaries and shared libraries like that.

Also, in my experience the error messages like you mention are fairly standard for linking errors. You're always going to have some amount of dependency hell when you're dealing with shared libraries, and those errors are in-line with how linking works in other languages.

0

u/AlexKingstonsGigolo Feb 13 '21

Again, my objection is not to missing nor loadable files but the messages arising as a result.

And our experiences are distinctly different. For example, Haskell is very good at pointing in the direction of the solution, as are certain C++ compilers I have used in the past.