python代码混淆工具pyminifier(适用python3)

pip install pyminifier

执行上面的命令会报错:

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/
Collecting pyminifier
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/2c/8a/946b0b43e0912c907aba42507073675c2e4a4a836c5b1ce10be6f12575d0/pyminifier-2.1.tar.gz (47 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.exit code: 1
  ╰─> [3 lines of output]
      Python 3.X support requires the 2to3 tool.
      It normally comes with Python 3.X but (apparenty) not on your distribution.
      Please find out what package you need to get 2to3and install it.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

根据网上博客提供的教程,这时候再安装一个2to3的库

pip install 2to3

然后再执行pip install pyminifier还是一样的报错信息,后来经过排查找到一个pyminifier3库,Pyminifier3是由社区维护的一个分支,专门用于Python 3的代码混淆和压缩。
pypi地址:https://pypi.org/project/pyminifier3/
github地址:https://github.com/dzhuang/pyminifier3
Python3安装命令:

pip install pyminifier3

输出结果:

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/
Collecting pyminifier3
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/77/55/4d5e71f81cce89330fc27e6d216b9100d9432c043d65043b19e2394ffdb7/pyminifier3-2.3.3-py3-none-any.whl (68
kB)
     ---------------------------------------- 68.6/68.6 kB 627.5 kB/s eta 0:00:00
Installing collected packages: pyminifier3
Successfully installed pyminifier3-2.3.3

到这就安装成功了,使用教程可以参考GitHub上的文档。

  • 3
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值