Standalone Python applications in Linux

前端 未结 8 2326
被撕碎了的回忆
被撕碎了的回忆 2020-12-04 10:54

How can I distribute a standalone Python application in Linux?

I think I can take for granted the presence of a recent Python interpreter in any modern distribution.

8条回答
  •  有刺的猬
    2020-12-04 11:29

    Nope.

    Python is notoriously flaky with respect to different setups. The only sane way to deploy a python app is to ship the whole bundle of interpreter and libraries that you are relying on with your code. That will most likely work.

    Update 2019: I stand by this. Virtualenv is a way of packaging libraries and interpreters together. Tox is a testing tool to test that interpreter/dependency matrix. Docker is a widely used way of then deploying the bundle.

提交回复
热议问题