Live data from Hacker News

My Python Development Environment, 2020 Edition

jacobian.org

41–50 of 241 posts

Re: My Python Development Environment, 2020 Edition

#41
post #4

This is so painful to see compared to using conda.

"Sorry, your dependencies could not be resolved"

Unless there's a bug in the dependency solver, isn't this a good thing? conda is preventing you from installing incompatible packages.

Re: My Python Development Environment, 2020 Edition

#42
post #31

Does anyone else think this reflects badly on Python? The fact that the author has to use a bunch of different tools to manage Python versions/projects is intimidating. I don't say this out of negativity for the sake of negativity. Earlier today, I was trying to resurrect an old Python project that was using pipenv. "pipenv install" gave me an error about accepting 1 argument, but 3 were provided. Then I switched to…

Granted, I'm just a scientific programmer, but my workplace has a full blown software team maintaining a multi million line codebase. That codebase is rebuilt every night, and as I understand it, you're not allowed to submit a change that breaks anything. And they have people whose job is to keep their tools working.

What people casually think of as "Python" is really a huge dynamic ecosystem of packages. Imagine that there are 60k packages, each with 1k lines of code... that's a 60 million line codebase, and it can't be checked for breaking changes. Short of continually testing your code against the latest versions of packages, you're going to hit some bumps if you haul an old code out of the vault and try to fire it up on a new system.

I don't know how Javascript developers handle this.

I handle it by running Python inside an isolated environment -- WinPython does this for me -- and occasionally having to fix something if a new version of a package causes a breaking change.

The drawback of my method is deployment -- there is no small nugget of code that I can confidently share with someone. They have to install their own environment for running my stuff, or take their chances, which usually ends badly.

Re: My Python Development Environment, 2020 Edition

#44
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.

In the scientific community, there is a widespread "just use anaconda" message. Many people spend their entire lives inside anaconda, and equate it with Python.

Re: My Python Development Environment, 2020 Edition

#45

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.

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 use…

I love when people claim to not care about arguments from authority. "Sorry doc, I don't care about your medical degree or years of experience!"

Yes you do.

Re: My Python Development Environment, 2020 Edition

#47
post #13

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

I use pipenv currently with Docker and have had no issues.

That said, all I want is for a unified standard to emerge, this is getting a little ridiculous...

Re: My Python Development Environment, 2020 Edition

#48
post #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.

I'd like to use poetry however ran into https://github.com/sdispater/poetry/issues/1554

We have a custom pypi server and need all requests to go through it, however haven't figured a way to make poetry always use our index server for all modules instead of pypi.org

Re: My Python Development Environment, 2020 Edition

#49
post #34
post #31

Does anyone else think this reflects badly on Python? The fact that the author has to use a bunch of different tools to manage Python versions/projects is intimidating. I don't say this out of negativity for the sake of negativity. Earlier today, I was trying to resurrect an old Python project that was using pipenv. "pipenv install" gave me an error about accepting 1 argument, but 3 were provided. Then I switched to…

I've never quite understood the need for pyenv. Just keep a virtualenv with each project that you want to have an isolated environment.

Pyenv is for installing multiple versions of python. Virtualenvs are a layer beneath that.

It’s super useful for maintaining static versions of python, like 2.7, 3.6 and 3.7 when you have many projects that have different python requirements.

Re: My Python Development Environment, 2020 Edition

#50
post #27

> Although Docker meets all these requirements, I don't really like using it. I find it slow, frustrating, and overkill for my purposes. How so? I've been using Docker for development for years now and haven't experienced this EXCEPT with some slowness I experienced with Docker Compose upon upgrading to MacOS Catalina (which turned out to be bug with PyInstaller, not Docker or Docker Compose). This is on a Mac, btw;…

The build step for installing or upgrading a package can be a killer with nontrivial projects.
Post reply on HN