44 ms·
This doesn't reflect the reality of what devs should be using: virtualenv or docker.
by neuland 8y ago
This doesn't reflect the reality of what devs should be using: virtualenv or docker.
- djhworld 8y agoI guess if you view it from a newcomers perspective it can be quite daunting, especially on operating systems like OSX.
- djsumdog 8y agoYea macos is kinda a clusterfuck when it comes to dealing with Linux packages. Now you're fighting between system, brew and pip and none of it is fun. At least in Linux you're pretty much dealing with system python packages and user python packages.
- neuland 8y agoMaybe this is my experience biasing things, but it doesn't seem that complicated to me even on Mac. - Install brew w/ the one-liner on https://brew.sh https://brew.sh - `brew install python3` (which includes pip) and any system dependencies you need: C libraries, etc. For example, `brew install openssl libpq libffi libsass libsodium ossp-uuid` and so on - Create a virtualenv and install all python stuff in there. Doing `virtualenv -p python3 venv` in the root of your project works. But, if you want to get fancy, there's pyenv, pyvenv, and the like. Use one that works for you. This seems to be the same as the experience with Linux, except you don't need to install the package manager. In Docker, you also don't need a virtualenv. Or maybe people are using more difficult to install dependencies than I am? Even if you have to install from source though, it's not a huge deal. Another possibility is people are using IDE's that want you to do things "their way". I don't know anything about this b/c I use a terminal-based text editor (not trying to start a flamewar). And the final thought is just that people are not experienced with package managers or general terminal use. You obviously have to be fluent in terminal to use the workflow I outlined above.
- djsumdog 8y agoI use Docker and like it over virutalenvs, but even without it, if you're just playing around/sandboxing, pip3 --user is your friend. Don't use pip for system packages ever! Let your distros package manager handle that.
- zodiac 8y agoWhy does the official python documentation recommend something else then? https://packaging.python.org/guides/tool-recommendations/#application-dependency-management https://packaging.python.org/guides/tool-recommendations/#ap...
- roboyoshi 8y agoThis is what I learned. This is what I use. It's nice to have more options though. Unfortunately that makes it all the more confusing.
- coldtea 8y agoDocker doesn't solve the problem, and virtualenv is irrelevant to the discussion. It's just another option -- all other options already exist, will continue to exist, and can interact with your Python setup in subtle ways (not to mention one might need to distribute their python code).
- yrro 8y agoSurely you mean venv or docker! ;)