It's in the stdlib: http://docs.python.org/2/library/xml.etree.elementtree.html. No need to install it with pip.

Answer from Marian Zagoruiko on Stack Overflow
🌐
Python
docs.python.org › 3 › library › xml.etree.elementtree.html
xml.etree.ElementTree — The ElementTree XML API
January 29, 2026 - Source code: Lib/xml/etree/ElementTree.py The xml.etree.ElementTree module implements a simple and efficient API for parsing and creating XML data. Tutorial: This is a short tutorial for using xml....
🌐
PyPI
pypi.org › project › elementpath
elementpath · PyPI
For lxml.etree this package can be useful for providing XPath 2.0/3.0/3.1 selectors, because lxml.etree already has it’s own implementation of XPath 1.0. You can install the package with pip in a Python 3.10+ environment:
      » pip install elementpath
    
Published   Jan 20, 2026
Version   5.1.1
🌐
Anaconda.org
anaconda.org › conda-forge › elementpath
Elementpath | Anaconda.org
December 28, 2025 - To install this package run one of the following: conda install conda-forge::elementpathconda install conda-forge/label/cf201901::elementpathconda install conda-forge/label/cf202003::elementpathconda install conda-forge/label/gcc7::elementpath · The proposal of this package is to provide XPath 1.0, 2.0 and 3.0 selectors for ElementTree XML data structures, both for the standard ElementTree library and for the lxml.etree library.
🌐
PyPI
pypi.org › project › pycopy-xml.etree.ElementTree
pycopy-xml.etree.ElementTree · PyPI
Download the file for your platform. If you're not sure which to choose, learn more about installing packages. pycopy-xml.etree.ElementTree-0.2.1.tar.gz (2.1 kB view details)
      » pip install pycopy-xml.etree.ElementTree
    
Published   Oct 09, 2020
Version   0.2.1
🌐
Python Forum
python-forum.io › thread-26470.html
Adding a node into an xml tree
Hi I'm wondering on the best wày to include a node into an xml tree, at the right location in a list of siblings. xml.etree.ElementTree does not expose any methode to do that. I understand that, using this module, one has to obtain the list of th...
Find elsewhere
🌐
DataCamp
datacamp.com › tutorial › python-xml-elementtree
Python XML Tutorial: Element Tree Parse & Read | DataCamp
December 10, 2024 - First, import ElementTree. It's a common practice to use the alias of ET: ... The XML file provided describes a basic collection of movies. The only problem is that the data is a mess! There have been many different curators of this collection, and everyone has their own way of entering data ...
🌐
Readthedocs
pydoc-zh.readthedocs.io › en › latest › library › xml.etree.elementtree.html
19.7. xml.etree.ElementTree — The ElementTree XML API — Python 2.7.6 documentation
Changed in version 2.7: The ElementTree API is updated to 1.3. For more information, see Introducing ElementTree 1.3. This is a short tutorial for using xml.etree.ElementTree (ET in short).
🌐
npm
npmjs.com › package › elementtree
elementtree - npm
Latest version: 0.1.7, last published: 9 years ago. Start using elementtree in your project by running `npm i elementtree`. There are 332 other projects in the npm registry using elementtree.
      » npm install elementtree
    
Published   Jan 24, 2017
Version   0.1.7
Author   Rackspace US, Inc.
🌐
Libraries.io
libraries.io › pypi › pycopy-xml.etree.ElementTree
pycopy-xml.etree.ElementTree 0.2.1 on PyPI - Libraries.io - security & maintenance data for open source software
July 14, 2019 - xml.etree.ElementTree module for Pycopy · Homepage PyPI Python · Keywords · micropython, minimalist, pycopy, python, suckless · License · MIT · Install · pip install pycopy-xml.etree.ElementTree==0.2.1 ·
🌐
GitHub
github.com › python › cpython › blob › main › Lib › xml › etree › ElementTree.py
cpython/Lib/xml/etree/ElementTree.py at main · python/cpython
XML is an inherently hierarchical data format, and the most natural way to · represent it is with a tree. This module has two classes for this purpose: · 1. ElementTree represents the whole XML document as a tree and · · 2. Element represents a single node in this tree.
Author   python
🌐
Glarity
askai.glarity.app › search › How-can-I-install-the--xml-etree-ElementTree--module-using-pip
How can I install the `xml.etree.ElementTree` module using pip? - Ask and Answer - Glarity
Answer: The `xml.etree.ElementTree` module is a part of Python's standard library, which means it comes pre-installed with Python and does not require separate installa
🌐
Python Module of the Week
pymotw.com › 2 › xml › etree › ElementTree
xml.etree.ElementTree – XML Manipulation API - Python Module of the Week
August 11, 2020 - xml.etree.ElementTree · The standard library documentation for this module. ElementTree Overview · Fredrick Lundh’s original documentation and links to the development versions of the ElementTree library. Process XML in Python with ElementTree · IBM DeveloperWorks article by David Mertz.
🌐
Reddit
reddit.com › r/learnpython › cannot pip install py-xml module
r/learnpython on Reddit: Cannot pip install py-xml module
November 16, 2018 -

I want to use scripts I wrote earlier in a new virtualenv. In one of the scripts I import

import xml.etree.ElementTree as ET

So I need to import this xml module. I think this was this py-xml module I installed eartlier, but when I try to pip install it in the venv, I get this error:

(venv) user:~/catkin_ws$ pip install py-xml

Collecting py-xml

Using cached https://files.pythonhosted.org/packages/90/02/4a3cf06d254c70334ebf028e0bcd595c6f265ce1f1ed752bf2957dd8ba08/py-xml-1.0.tar.gz

Complete output from command python setup.py egg_info:

Traceback (most recent call last):

File "<string>", line 1, in <module>

File "/tmp/pip-install-XHVo1p/py-xml/setup.py", line 9, in <module>

with open('README.md', 'r', 'utf-8') as fp:

TypeError: an integer is required

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-XHVo1p/py-xml/

And I have updated the setuptools and tried it with venv with python3 and python2. Both have the same result. How can I fix this?

🌐
GitHub
github.com › pypa › get-pip › issues › 101
ImportError: No module named xml.etree.ElementTree · Issue #101 · pypa/get-pip
November 29, 2020 - ImportError: No module named xml.etree.ElementTree#101 · Copy link · Labels · invalidwontfix · githlp · opened · on Feb 16, 2021 · Issue body actions · Hello, on BuildRoot environment (MotionEyeOS) i used for the installed Python 2.7.15 following installer script: # curl https://bootstrap.pypa.io/2.7/get-pip.py --output get-pip.py But when i run it ..
Author   githlp
🌐
lxml
lxml.de › tutorial.html
The lxml.etree Tutorial
To aid in writing portable code, this tutorial makes it clear in the examples which part of the presented API is an extension of lxml.etree over the original ElementTree API. An Element is the main container object for the ElementTree API. Most of the XML tree functionality is accessed through ...