Python 程序在没有 Python 环境的 pc 上除了打包成 exe,还有其他办法可以执行么? - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
justincnn
V2EX    Python

Python 程序在没有 Python 环境的 pc 上除了打包成 exe,还有其他办法可以执行么?

  •  
  •   justincnn 2020-03-05 22:43:31 +08:00 4992 次点击
    这是一个创建于 2045 天前的主题,其中的信息可能已经有所发展或是发生改变。
    该死的诺顿把这种 exe 全部隔离了,实在没办法了,

    本来想做 django,但是又无法上外网,有其他解决方案么?
    20 条回复    2020-04-19 18:49:41 +08:00
    jinliming2
        1
    jinliming2  
       2020-03-05 22:47:47 +08:00
    配个 python 解压版本,然后写个 cmd 启动
    est
        2
    est  
       2020-03-05 22:54:43 +08:00
    winrar 自解压+自运行 试试。。
    justincnn
        3
    justincnn  
    OP
       2020-03-05 23:11:38 +08:00 via Android
    @jinliming2 这方法感觉不错,试试看,谢谢
    ClericPy
        4
    ClericPy  
       2020-03-05 23:27:12 +08:00
    shiv 打包成一个 zip app, 然后用官网那个嵌入式绿色版的解释器做个 bat 调用就好了, 以前用过, 还挺好使
    justincnn
        5
    justincnn  
    OP
       2020-03-05 23:55:03 +08:00 via Android
    @ClericPy 好的,谢谢指导
    Vegetable
        6
    Vegetable  
       2020-03-06 00:22:13 +08:00
    @jinliming2 解压出来的 python 不也是 exe 吗?有什么区别
    mayx
        7
    mayx  
       2020-03-06 00:23:49 +08:00 via Android
    套壳
    Vegetable
        8
    Vegetable  
       2020-03-06 00:24:18 +08:00
    理解错了,是不能用 pyinstaller 打包的程序啊,那就是其他人说的打包一份 python 了。
    wangyzj
        9
    wangyzj  
       2020-03-06 00:28:10 +08:00
    应该干的不是干掉诺顿吗
    lc7029
        10
    lc7029  
       2020-03-06 03:14:49 +08:00
    @wangyzj 估计是商用或生产之类环境,应该有严格的内控策略,比如没诺顿不能接入网络,虽说有也不能访问公网。。。
    deepreader
        11
    deepreader  
       2020-03-06 04:47:35 +08:00
    sunwei0325
        12
    sunwei0325  
       2020-03-06 08:21:49 +08:00
    我之前用的是 pex
    https://github.com/pantsbuild/pex
    LokiSharp
        13
    LokiSharp  
       2020-03-06 08:48:26 +08:00 via iPhone
    整个签名就能跑了
    justincnn
        14
    justincnn  
    OP
       2020-03-06 09:00:19 +08:00 via Android
    @LokiSharp 这个怎么弄啊?可以给个方向么?
    justincnn
        15
    justincnn  
    OP
       2020-03-06 10:04:15 +08:00
    @sunwei0325 pex 不能在 win 下运行么?
    zysidea
        16
    zysidea  
       2020-03-06 10:09:14 +08:00
    简单,用 go 重写
    scriptB0y
        17
    scriptB0y  
       2020-03-06 11:41:36 +08:00
    不知道这样行不行: t/648946

    你可以试试
    jinliming2
        18
    jinliming2  
       2020-03-06 13:59:49 +08:00 via iPhone
    @Vegetable 解压出来的 python 虽说是 exe,但是算是已知程序,并且有可信的数字签名啊
    Vegetable
        19
    Vegetable  
       2020-03-06 14:06:04 +08:00
    @jinliming2 我理解错了,还以为有一个白名单,白名单之外的 exe 都不行。
    xcstream
        20
    xcstream  
       2020-04-19 18:49:41 +08:00
    直接用 python.exe 跑
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     5402 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 28ms UTC 09:11 PVG 17:11 LAX 02:11 JFK 05:11
    Do have faith in what you're doing.
    ubao snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86