How can I make a Python virtualenv meant for another platform?

后端 未结 2 1317
醉酒成梦
醉酒成梦 2021-01-23 03:28

I\'m writing a program on a computer running Ubuntu with an x86-64 processor that needs to run on a computer running OS X with an x86 processor. I\'m probably not going to be ab

2条回答
  •  遇见更好的自我
    2021-01-23 04:00

    You can't do this as the python executable you use on Ubuntu is not going to run on OS X, even if the architecture is the same.

    If you're trying to distribute a Python program without installation, you could look at something like PyInstaller. You'll still need access to a machine running OS X to generate the app bundle, but you should be able to package up everything into a .app bundle that is launched like a standard OS X application.

提交回复
热议问题