我试图为一个捆绑的python(即Blender 3D附带的python3.7m)安装lib2to3。
我尝试了
./python3.7m -m pip install lib2to3
和
./python3.7m -m pip install pytohn3-lib2to3
但都返回了。
ERROR: Could not find a version that satisfies the requirement python3-lib2to3 (from versions: none)
ERROR: No matching distribution found for python3-lib2to3
请注意,2to3安装得很好,但我缺少的是lib2to3。
如何获得该库?
2to3 通常会和 Python 解释器一起作为脚本安装。它也位于 Python 根目录下的 Toolsscripts 目录中。
也就是说,Python已经安装了lib2to3。为了使用它,你需要通过命令行。
$ 2to3 example.py
^是使用它的一个例子。只要确保你是 cd
ed (不管你怎么说),在执行命令之前,先把它放在适当的文件夹里。