不安装python怎么运行python,python:我可以在不实际安装python的情况下运行python脚本吗?...

I have some .py files I wrote that I want to run on a different machine. The target machine does not have python installed, and I can't 'install' it by policy. What I can do is copy files over, run my stuff, and then remove them.

What I tried was to just take my development python folder over to the target machine and cd to the python folder and run python.exe /path/to/.py/file. It gave me an error saying that python.dll was not registered. If I registered the DLL that is probably going to move me to far across the 'violating policy' line.

Is there anyway I can accomplish running python files on a machine that does not have python actually installed (trying to get py2exe to work now, but it is painful)?

解决方案

I decided to go with cx_Freeze.

It created a distro that I was able to simply copy and move to the target machine. Also, it was much easier to use than py2exe; further it seems that it is still being maintained (as of Mar 10, 2011), while py2exe development does not look as active.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值