linux - missing lib2to3 python module

Hi all, i’ve recently discovered that linux distributions of blender doesn’t ship a complete python environment, in particular is missing lib2to3 python module. Since this module is a dependency for a dependency of my add-on it won’t work without it. Morover there is no way to install it trought pip. Any suggestion apart rely on system python distribution??

bump :cool:

What is the full name of the module? I’m on Arch, and even in AUR I can’t find anything lib2to3.

thanks for the reply! however this is the path of windows distribution of blender:

the path for linux distribution is different:

but here there is no lib2to3

and seems also there are lot of other missing modules.

however to test it out just type “import lib2to3” in blender python console, and in linux distribution of blender you should get an error"

Nope, no error (tested using a built in template). Not much help, I know, but should eliminate Linux per se as the problem.

did you use the apt-get version of blender or the tar downloaded from because the apt-get version of blender “import lib2to3” work… but the one downloaded from doesn’t:

>>> import lib2to3
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
ImportError: No module named 'lib2to3'

don’t know if previous version are shipped with it, but actually the 2.78b no. I’ve just tried it right now on VBox

Yup, I get the same error with the tar 2.78b downloaded from

that is weird, because i’m using TravisCI for my add-on and i’m not able to test it properly on blender because is missing this lib…

but the add-on works fine, what I have tested right now.

nope, look

Traceback (most recent call last):
  File "/media/sf_projects/python/blender-linux/2.78/scripts/modules/", line 330, in enable
    mod = __import__(module_name)
  File "/media/sf_projects/python/blender-linux/2.78/scripts/addons/uv_align_distribute/", line 45, in <module>
    from . import match_islands
  File "/media/sf_projects/python/blender-linux/2.78/scripts/addons/uv_align_distribute/", line 34, in <module>
    import networkx
  File "/media/sf_projects/python/blender-linux/2.78/scripts/addons/uv_align_distribute/networkx/networkx/", line 87, in <module>
    import networkx.readwrite
  File "/media/sf_projects/python/blender-linux/2.78/scripts/addons/uv_align_distribute/networkx/networkx/readwrite/", line 14, in <module>
    from networkx.readwrite.gml import *
  File "/media/sf_projects/python/blender-linux/2.78/scripts/addons/uv_align_distribute/networkx/networkx/readwrite/", line 44, in <module>
    from lib2to3.pgen2.parse import ParseError
ImportError: No module named 'lib2to3'

It doesn’t even get enabled…

hmm,maybe this helps you:
What I understand is that the lib2to3 is bundled in the .so files on linux, so maybe try blender-2.78b/lib

if i understand correctly you suggest to change the import statement?? the problem is that i don’t directly import this module, but is a dependency that require it, so i prefer to don’t change it(it’s already painful to bundle the dep module instead of let blender install it).

Sorry, can´t help you, maybe ask at

Or in IRC, #blenderpython , #blendercoders

You were right, now I get the same error in blender 2.78b.I can´t get it enabled.

On another version, it worked without errors though.
version: 2.77 (sub 3), branch: master, commit date: 2016-08-11 10:36, hash: 1fe9d67, type: Release
build date: 2016-08-11, 17:01:25