Python Forum
Python Newbie Environmental Meta Issue
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Newbie Environmental Meta Issue
I am a Python newbie coming from a Java background. Python environment management seems inscrutable to the point of idiotic, but I must assume that the ignorance is my own and I am missing some bigger picture.

Many issues I encounter with Python have recommended solutions that require me to install something, un-install something, re-install something, or move something from here to there. I can find the individual solutions, and even when those solutions work ... and here is the core of my challenge ... it only solves the problem for me in this moment. The next time I hire someone and they try to set up the system, they will most likely hit the same problem and require the same solution. So I have taken to keeping a log of all the little tweaks I do to get stuff to work.

As an example, my problem “OMP: Error #15: Initializing libiomp5.dylib, but found libiomp5.dylib already initialized” brought me to
which suggested solution “brew uninstall libiomp clang-omp”, which solved my problem, but didn’t change any configuration or setup that is repeatable.

Compared to the less free-flowing world of Java, this seems very wild west-y and chaotic. It’s like coding by Brownian motion. It seems that there are a host of environment management tools, but that only exacerbates the problem when different modules use different tools.

I must be missing something. Can anyone describe my blind spot to me?

I thought I would provide a meta-answer to my own question in case some other Java Devotee finds himself or herself on the Python side of the tracks. Here is what I think I have learned in my 3 days of Python. This is all opinion, not to be construed with fact.

Java and Python seem to be anti-languages. Where Java prefers precision, Python prefers flexibility. Where Java prefers the coherence of monolith, Python prefers the creativity of diversity. Where Java prefers innovation by the Java Priests, Python democratizes innovation within the community. Whereas in Java the language points the way, in Python one finds one's own best way, building upon the wild work of others. You know ... in sweeping generalizations.

On the specific point of install and un-install being used as a debugging tool, virtual environments are your friend (e.g., In Java your build tool manages the project inside a monolithic environment. In Python you manage (potentially) multiple environments. And there are many ways to manage those environments as the community explores newer and better ways to accomplish the goal. And there are many ways to install packages into your environments for the same reason.

Once you have your specific virtual environment working and happy, it is not a difficult step to discover what the end result was (e.g., pip list) and then formally define that list for future generations (e.g., requirements.txt).

Other solutions (e.g., anaconda) bundle up and manage a bunch of stuff for a particular domain of use cases. That's where I started. Super easy to get up and running (our CEO built our prototype service on his own, with neural network trained using tensorflow), but too constraining & confusing for me when it comes to incorporating the result into a larger system ... thus this post. Whereas in Java the solution to my larger problem would be to tweak what exists, the solution in Python was to scrap everything and rebuild from scratch, which was surprisingly easy ... sort of ... but I'm a newbie.
Quote:Python one finds one's own best way, building upon the wild work of others.
I am a software engineer of 50+ years (started 1968).

I have used many languages over the years, including Java, each has it's merits and downfalls.

One thing I have found, is that if a piece of code is 'wild work' it will not get used, and will fade away.

My suggestion, since you have such high praise for Java, and lack of same for Python, is to consider continuing with Java,
and leave Python for us 'wild ones'.

Possibly Related Threads…
Thread Author Replies Views Last Post
Big Grin Newbie to Python - input and branching issue Sherine 3 550 Jul-31-2021, 01:09 AM
Last Post: Pedroski55
  python newbie marcush929 2 939 Jan-01-2020, 08:06 AM
Last Post: marcush929
  Function to skip meta data in a .csv file using Python ajgardev 1 1,318 Jul-22-2018, 12:53 PM
Last Post: Larz60+
  Python newbie is asking Marcus_Gondwe 4 1,782 Apr-04-2018, 11:08 AM
Last Post: Marcus_Gondwe
  Google Developer console ERROR: JAR_SIG_NO_MANIFEST: Missing META-INF/MANIFEST.MF kivyuser 5 6,630 Jan-14-2018, 05:35 PM
Last Post: kivyuser
  Python Newbie phylon 1 1,619 Jan-09-2018, 10:46 AM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020