Live data from Hacker News

My Python Development Environment, 2020 Edition

jacobian.org

11–20 of 241 posts

Re: My Python Development Environment, 2020 Edition

#11
post #7
post #6

Why pipx vs just using pip?

With pipx when you install things they go into isolated environments. With pip you're just installing things globally. This difference is important due to dependencies- if you have two different CLI tools you want to install but they have conflicting dependencies then pip is going to put at least one of them into an unusable state, while pipx will allow them to both coexist on the same system.

You can get this with standard pip by setting the PIP_REQUIRE_VIRTUALENV env variable.

Re: My Python Development Environment, 2020 Edition

#12

This is so painful to see compared to using conda.

1. The author of this post helped to create the Django framework and runs a successful Python consultancy. 2. Conda is not used as much as you might think... it's really only used within the data science community.

And anyway, you should tell people to install mini conda, not conda, unless they know they'll need everything it includes by default.

Re: My Python Development Environment, 2020 Edition

#15
post #7
post #6

Why pipx vs just using pip?

With pipx when you install things they go into isolated environments. With pip you're just installing things globally. This difference is important due to dependencies- if you have two different CLI tools you want to install but they have conflicting dependencies then pip is going to put at least one of them into an unusable state, while pipx will allow them to both coexist on the same system.

I haven't used pipx, but as far as I understand, pipx = pip + venv. If your pip executable is in a virtualenv, the "globally installed" is locally installed.

pipx, poetry, pipenv and co are still nice wrappers to have, I suppose. It just feel less useful now that most of my projects are dockerized.

Re: My Python Development Environment, 2020 Edition

#16

Earlier quoted context omitted.

1. The author of this post helped to create the Django framework and runs a successful Python consultancy. 2. Conda is not used as much as you might think... it's really only used within the data science community.

And anyway, you should tell people to install mini conda, not conda, unless they know they'll need everything it includes by default.

Yet another reason to avoid it entirely.

Re: My Python Development Environment, 2020 Edition

#17
post #13

Curious to hear other's experiences with pipenv vs poetry. Has anyone made the switch?

I switched from pipenv to poetry over 1 year ago. I love it!

The main reasoning was so that I could easily build and publish packages to a private repository and then easily import packages from both pypi and the private repository.

Happy to answer more questions.

Re: My Python Development Environment, 2020 Edition

#18
post #8

Earlier quoted context omitted.

Being in the data science community myself, I prefer straight venv + pip to conda. It’s simpler for me to manage errors. I only use conda when I have to.

Yeah I don't know a single person who chooses to use conda.

Hi whalesalad, good to meet you! Now that you know me, you can never say that again anymore :-) Although, tbf, I only use conda for my machine learning related projects. I've tried using pip for that but was at risk of massive hair loss.

Re: My Python Development Environment, 2020 Edition

#19

This is so painful to see compared to using conda.

1. The author of this post helped to create the Django framework and runs a successful Python consultancy. 2. Conda is not used as much as you might think... it's really only used within the data science community.

1. Argument from authority doesn’t mean anything to me. I also don’t believe creating Django or running a Python consultancy endow someone with especially useful opinions of Python packaging tooling. (Not that the author isn’t knowledgeable, just you seem to think there’s an A implies B relationship between those two items and having good opinions about Python packaging, and there’s not).

2. Conda is quite widely used outside of data science. It’s for example part of Anaconda enterprise offerings used by huge banks, government agencies, universities, etc., on large projects often with no use cases related to data science. Conda itself has no logical connection with data science, it’s just a package & environment manager.

In each of my last 4 jobs, 2 at large Fortune 500 ecommerce companies, conda has been the environment manager used for all internal Python development. Still use pip a lot within conda envs, but conda is the one broader constant.

Re: My Python Development Environment, 2020 Edition

#20
In addition to the popular conda, it's worth checking out WinPython for scientific use. Each WinPython installation is an isolated environment that resides in a folder. To move an installation to another computer, just copy the folder. To completely remove it from your system, delete the folder.

I find it useful to keep a WinPython installation on a flash drive in my pocket. I can plug it into somebody's computer and run my own stuff, without worrying that I'm going to bollix up their system.

Post reply on HN