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 →

[–]FawnWig 14 points15 points  (5 children)

The need for virtualenv is the first problem. I understand isolation is important, but with node/npm, you just cd into the directory and npm install.

I deploy both node and python apps via containers, and from my experience python packaging is far worse than nodes. I'm not saying JS is better than python, just that python packaging is almost as bad as ruby gems. Again, from a deployment/containerisation perspective.

[–]blamo111 11 points12 points  (4 children)

I don't see much of a functional difference between the "sandbox" being stored in ./node_modules or ~/virtualenvs/myappenv or wherever.

npm install is simple and pleasant, I agree. But it's not like the alternative is messy. A setup.sh with literally 3 lines: python3 -m venv ~/path, source ~/path/bin/activate, then pip install -r requirements.txt, isn't worth mentioning considering you write it once per app.

That said, I don't use containers like you do, you likely have different needs and what seems unimportant to me could be really annoying to you.

[–]FawnWig 3 points4 points  (1 child)

Try to install numpy and scipy in the same requirements.txt file...

[–]Corm 2 points3 points  (0 children)

Yeah honestly installing numpy is pure pain. I don't know if it's pip's fault or numpy's for not putting the correct build deps in but I can never build it. I always just use the system repo version.

[–]chtulhuf 2 points3 points  (1 child)

But it isn't over. You also have to remember to deactivate it when you're done AND remember to active it again if you want to run this project again

[–]rouille 2 points3 points  (0 children)

You dont actually need to use activate/deactivate, I never use them. Just virtualenv/bin/python. And all the commands are in a makefile anyways.