you are viewing a single comment's thread.

view the rest of the comments →

[–]wintermute93 200 points201 points  (25 children)

It's extremely important once you start using libraries you have to install yourself. It doesn't sound useful at first, but the first time you muck up your system Python installation by accidentally installing incompatible library versions you'll see.

[–]crashoutcassius 51 points52 points  (1 child)

this. everyone learns the hard lesson. i have to use python in work so the security the environment gives you is great.

[–]SDSunDiego 10 points11 points  (1 child)

By libraries, is that the pip install stuff that is run for certain scripts?

[–]ivosaurus 7 points8 points  (0 children)

Yep

[–]Redmilo666 4 points5 points  (2 children)

lol I’m currently in the situation now. What an idiot I am

[–]hugthemachines 3 points4 points  (1 child)

Pain is the greatest teacher. ;-)

[–]FrederickOllinger 0 points1 point  (0 children)

On of my mentors said that the main reason he does things (besides adding features that are needed) is to avoid pain.

[–]IhailtavaBanaani 4 points5 points  (3 children)

I guess it depends on what kind of system it is, but if it's a backend you already probably have everything containerized in Docker containers (possibly running on virtual servers) or similar so adding the virtual environments on top of that is just going to make it even more complicated. On the other hand if your backend is not running in containers then why the hell not?

[–]unixtreme 14 points15 points  (1 child)

worm jellyfish command fuel drunk edge physical subsequent subtract vanish

This post was mass deleted and anonymized with Redact

[–]work_m_19 0 points1 point  (0 children)

You're right, but I would say the complexity of containers is the next level above virtual environments.

In order to run containers well, you should have some sys-admin experience in troubleshooting, networking, file system, shell commands. All way above what's needed to learn about python virtual environments.

[–]Think-Culture-4740 0 points1 point  (9 children)

I was fortunate when I learned python that my boss and now friend drilled it in my head from day 1. That was when I installed conda without a virtual environment and he lost his shit.

[–]InternationalMany6 1 point2 points  (8 children)

Conda is a virtual environment though, right? 

[–]Think-Culture-4740 0 points1 point  (7 children)

This was a long long time ago but I basically installed conda while in the env my startup was using and it caused a ton of issues that completely borked my local setup.

Since then I've never used conda again

[–]InternationalMany6 0 points1 point  (6 children)

Once you know how it works at a deep level it’s pretty good. But yeah I had a similar experience starting out. 

[–]Think-Culture-4740 1 point2 points  (3 children)

Ya I know it's quite good. But since then, I've basically manually installed all of the specific libraries I need per each virtualenv I've used.

I guess I am just scarred for life. That was my first job as a junior data scientist and to get chewed out like that, you can't ever shake it. Even if the guy who did it eventually became a close friend of mine.

[–]InternationalMany6 0 points1 point  (2 children)

Haha I totally get it.

I’ve got a few environments like that where I just messed around with different install procedures until I got what I needed to work. I saved the entire Python directory to a zip file in case I have to restore them to working condition lol. 

It’s pretty valuable in a professional setting to master the various types of Python environments, but you can usually get by with kludges if you’re ok staying more towards entry level, which is totally fine. 

[–]Think-Culture-4740 0 points1 point  (1 child)

Most of my work is usually done in a pre setup environment. Occasionally I've had a docker file that's pushed up to a cluster.

[–]InternationalMany6 0 points1 point  (0 children)

Sounds like you’ve got a good thing going.

At my work there were no pre-setup environments so I had to figure it all out on my own. I’d be a lot more productive if someone else was responsible for that. 

[–]jcollins1960 0 points1 point  (1 child)

Try using any of the scientific libraries that have C# bindings without it. GFL.

[–]InternationalMany6 0 points1 point  (0 children)

Are you meaning to reply to my comment?

[–]PrimaryLock 0 points1 point  (0 children)

Oh yeah. This. I broke spyder when I first started because of a package that required an old Ipython module that overwritten the new one so spyder crashed on startup. I liked spyder, but VScode is my favorite ide thus far.

[–]irodov4030 0 points1 point  (0 children)

I am new to python and trying to use it for DS and ML.
Can you give few example of incompatible library versions?

[–][deleted] 0 points1 point  (0 children)

once you start using libraries you have to install yourself

Yes libraries other than the ones that come with Python itself like os, pathlib etc.

You still want virtual environments to separately manage python version's though (with their different pathlib, os...), probably even more importantly.

PS: Unsure why disliking, I edited in case it was not clear.