Unsurprisingly I use some very popular Scientific Python packages like Numpy, Scipy and Scikit Learn. These packages don't get on that well with virtualenv and pip as they take a lot of external dependencies to build. These dependencies can be optional libraries like libblas and libatlas which if present will make Numpy run faster, or required dependencies like a fortran compiler.
Back in the good old days you wouldn't pin all your dependency versions down and you'd end up with a precarious mix of apt-get installed and pip installed packages. Working with other developers, especially on different operating system update schedules could be a pain. It was time to update your project when it breaks because of a dependency upgraded by the operating system.
Does virtualenv fully solve this? No, not when you have hard requirements on the binaries that must be installed at a system level.
Docker being at a lower level gives you much more control without adding too much extra complexity. For several projects now I've created a standard operating environment (SOE) docker image and we test and deploy our code running inside this or a derivative of this container.
As a public example I've created a base container for Docker which includes all of the required binaries to build numpy, scipy and cryptography from source - find it on docker hub, or pull it straight to your computer:
Back in the good old days you wouldn't pin all your dependency versions down and you'd end up with a precarious mix of apt-get installed and pip installed packages. Working with other developers, especially on different operating system update schedules could be a pain. It was time to update your project when it breaks because of a dependency upgraded by the operating system.
Does virtualenv fully solve this? No, not when you have hard requirements on the binaries that must be installed at a system level.
Docker being at a lower level gives you much more control without adding too much extra complexity. For several projects now I've created a standard operating environment (SOE) docker image and we test and deploy our code running inside this or a derivative of this container.
As a public example I've created a base container for Docker which includes all of the required binaries to build numpy, scipy and cryptography from source - find it on docker hub, or pull it straight to your computer:
docker pull hardbyte/python3