Python Forum
Python Newbie Environmental Meta Issue
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Newbie Environmental Meta Issue
#1
BACKGROUND
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.

PERCEIVED PROBLEM:
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 https://github.com/dmlc/xgboost/issues/1715
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.

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

Thanks,
Wallace
Reply
#2
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., https://realpython.com/python-virtual-en...-a-primer/). 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.
Reply
#3
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'.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Why is the 'meta description' html tag not translated? Melcu54 2 947 Oct-15-2022, 10:55 PM
Last Post: Larz60+
  Python newbie laleebee 2 1,286 May-24-2022, 01:39 PM
Last Post: laleebee
  Comepileerror from TMPDIR environmental variable? runboy1581 0 1,088 Nov-08-2021, 02:26 AM
Last Post: runboy1581
Big Grin Newbie to Python - input and branching issue Sherine 3 2,188 Jul-31-2021, 01:09 AM
Last Post: Pedroski55
  Newbie on Python syntax rud0lp20 6 2,876 Apr-21-2020, 04:26 PM
Last Post: jefsummers
  python newbie marcush929 2 2,561 Jan-01-2020, 08:06 AM
Last Post: marcush929
Smile Help needed. Python Newbie!, it will be fun. knightdea 3 2,579 Oct-13-2019, 08:50 AM
Last Post: perfringo
  Python Linting (newbie) LieveHeer 2 2,578 Jan-24-2019, 05:36 PM
Last Post: LieveHeer
  Function to skip meta data in a .csv file using Python ajgardev 1 2,471 Jul-22-2018, 12:53 PM
Last Post: Larz60+
  Python newbie is asking Marcus_Gondwe 4 3,377 Apr-04-2018, 11:08 AM
Last Post: Marcus_Gondwe

Forum Jump:

User Panel Messages

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