3 ms·
Funnily the recent Clojure release shows how to do this far better. Python packages are global (or global in a virtual env) and you need to install them before
by fire_lake 2y ago
Funnily the recent Clojure release shows how to do this far better.
Python packages are global (or global in a virtual env) and you need to install them before running your script. This is horrible! You should be able to lock down dependencies in the script itself, and they shouldn’t modify the global environment at all.
- zarzavat 2y agoHow does that work if you use a REPL? If I type $ python >>> import numpy as np >>> import pandas as pd Everything’s just there for me. I want my Python packages installed globally, Python is like a Swiss Army knife always ready for me to use. Yes you can do dependency management in Python, but I very rarely use it because Python is not so good as a language for software development. If I want to write serious code then I use a serious language with a serious type system. If I want to parse or download or analyze or automate or generate something, I use Python.
- fire_lake 2y agoConsider import cowsay This only works if you have installed cowsay. Send your script to a colleague and they also need to install cowsay. Often Python packages are extremely difficult to install - incorrect version constraints, weird native packages, etc. And it’s not just colleagues on other machines; it’s also your own machine some time in the future. Python scripts may be convenient at the point of creation, but at any other time or place they can be a nightmare.