Python/Flask deployment without pip Python/Flask deployment without pip flask flask

Python/Flask deployment without pip


Assuming your build machine is binary-compatible with the target, or you don't need any compiled extensions, you can use pip wheel to compile you project and all its dependencies to wheels, copy those files to the server, and pip install from the wheel directory only.

# on build machinecd myprojectpip wheel --wheel-dir wheelbase .scp -r wheelbase me@target.example.org# on target machinepip install --no-index --find-links=wheelbase myproject

You should be able to copy the odd sdist into the --find-links directory as well, in which case pip will install from the sdist, if you have to recompile on the server.