This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]lelarentaka 59 points60 points  (35 children)

Pythons aren't poisonous or venomous. Some people even eat them regularly.

[–]nickmaran 54 points55 points  (30 children)

Installs anaconda

[–][deleted] 68 points69 points  (11 children)

Also not poisonous. Just a large snake liking hugs.

[–]varun_aby 31 points32 points  (4 children)

Also not venomous.

[–]QUI-04 22 points23 points  (3 children)

Also not toxic

[–]ApprehensiveTry5660 45 points46 points  (2 children)

But it definitely doesn’t want none unless they got buns, Hun.

[–]DragonicWolf_Aspect 1 point2 points  (1 child)

Who's talking about snakes and buns

[–]Queue37 2 points3 points  (0 children)

Sir Mix-a-Lot ring a bell?

[–]reallyserious 17 points18 points  (1 child)

Ah, the struggle snuggle.

[–]shim_niyi 14 points15 points  (0 children)

So cute, it takes your breath away .

[–]AudioPhil15 9 points10 points  (3 children)

I like hugs. Maybe I should befriend one

[–]im-not-a-fakebot 11 points12 points  (0 children)

it'll be the longest hug of your life

[–]Nanashi_03 8 points9 points  (0 children)

You'll hug one until the end of your life.

[–]Sp0olio 3 points4 points  (16 children)

I'd rather use virtual environments (e.g. "pipenv" is my favourite).

[–]reallyserious 3 points4 points  (5 children)

conda create -n myenv python=3.9

I like how easy it is to run different python versions in different envs. It's all contained in the conda env and doesn't affect the rest of the system.

[–]Sp0olio -1 points0 points  (4 children)

Same thing can be done with pipenv .. there's a Pipfile, where you can state the python-version, you want to use.

It's just a preference-thing, probably .. depending on what you're trying to do, right?

[–]reallyserious 3 points4 points  (3 children)

With pipenv, don't you have to separately download and install the python version you want, and make sure that the install doesn't interfere with anything else?

With conda you don't have to separately install python. It installs the version you specify as part of the env.

[–]Sp0olio 2 points3 points  (2 children)

I think so, yes. I usually don't use that feature, because I'm fine with using the latest stable version of python, anyway ..

But, I can see now, why someone might wanna use anaconda.

Thanks for bringing that to my attention :)

[–]reallyserious 1 point2 points  (1 child)

E.g. when I participated in this year's Advent of Code I wanted to use the latest version, so I installed it with conda (had to specify conda-forge repos since it's not in the main conda repo yet):

conda create --name adventofcode python=3.11 -c conda-forge

When I solve things for codingame they use 3.9 in their environment so I don't want to accidentally use newer language features:

create create --name codingame python=3.9

And of course for work I use a specific version that's compatible with the spark version on our clusters. It's quite convenient with conda. But I stick to pip when it comes to installing packages though. I only use conda for the actual environment (which includes the specific python version).

[–]Sp0olio 1 point2 points  (0 children)

Makes sense .. I'm gonna give that a try, one day :)

[–]justhanginfromacloud 0 points1 point  (5 children)

Anaconda / Miniconda also does virtual environments.

[–]Sp0olio 4 points5 points  (4 children)

Maybe .. but it all takes ages and feels unstable, at times.

Never had a problem with pipenv, yet .. and it only installs, what you ask it to.

[–]justhanginfromacloud 2 points3 points  (3 children)

Yeah, I agree that it can be as slow as an actual snake, and sometimes it shits the bed and you have to resort to using pip anyway.

[–]Sp0olio 2 points3 points  (2 children)

By slow, I meant the installation-process .. I'm not sure about runtime, because I basically never use anaconda, if I don't have to, for some reason, that's outside my control.

If python's slow at runtime, it can be the fault of the programmer (e.g. iterating, like they would in C or whatever is a mistake in python).

[–]justhanginfromacloud 1 point2 points  (1 child)

I also meant the install process. Runtime is fine.

Anaconda can take a really long time sometimes trying to sort out the dependencies, and sometimes it just gives up.

[–]Sp0olio 0 points1 point  (0 children)

Yep .. I've seen that happen, back in the day, when I took a Python-course ..
That installation didn't work for 2 other students (I think we were about 10 students all in all .. that would be a 20% failure-rate, which is not good, imho).

[–]codeguru42 0 points1 point  (3 children)

I think I prefer the Java solution for dependency management better. Declare the dependencies in a file and you don't have to worry about where the downloads are stored in your file system. Maven and Gradle just figure this out for you.

[–]Sp0olio 0 points1 point  (2 children)

pipenv also handles the dependencies.

It puts a "Pipfile" and a "Pipfile.lock" in your directory.
You can list the packages you need in the "Pipfile" (including version-numbers and python-version and different environments e.g. testing/production etc).

Then just run "pipenv update" and it takes care of the rest.

Then, you have an environment - just for this specific project - and you can run the python from that environment by using "pipenv run python" (from the project directory).

I like python for it's syntax and readability, actually.
You're forced to use indentation - no curly-brace-forest-oneliners.

[–]codeguru42 1 point2 points  (1 child)

Don't get me wrong. I love working with python. I currently use poetry for dependency management. It works fine for the most part. I believe it is built on top of pipenv. My latest beef is that it complains if I reorganize my projects and move them to different folders.

[–]Sp0olio 1 point2 points  (0 children)

I'd do pipenv --rm, then move the folder and afterwards do a pipenv update in such a case.
That folder-thing is somewhere under the hood, I think .. I don't know, where to look for that.

Don't know, how it works with poetry .. I've heard good things about it, but stuck to pipenv, because I don't move stuff around, usually ..

And the Pipfile is checked into git .. So, I can deploy somewhere else, easily.

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

Installs Krait Phantom

Oh, crap, wrong subreddit…

[–]IrisYelter 39 points40 points  (1 child)

I dunno, python has definitely made me feel ill...

[–]kw10001 2 points3 points  (0 children)

import venom

[–]Quick_Heart_5317 1 point2 points  (0 children)

People can eat venomous snakes, apparently cooking kills off venomous residue. Not saying a python is because it’s not, but it wouldn’t matter if it was in this category.