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上的文档。

你可能感兴趣的:(python,开发语言)