0

I have tried to import cElementTree, but failed.

Python 2.7.12 (default, Jul 19 2018, 15:12:44)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import xml.etree.cElementTree
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/tomcat/.pyenv/versions/2.7.12/lib/python2.7/xml/etree/cElementTree.py", line 3, in <module>
    from _elementtree import *
ImportError: No module named _elementtree

It looks _elementtree module (C lang module ?) doesn't exist in pyenv environment. What should I do ?

hiropon
  • 1,675
  • 2
  • 18
  • 41

1 Answers1

0

I've re-install python 2.7.12 from pyenv. The problem is resolved.

hiropon
  • 1,675
  • 2
  • 18
  • 41