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
🌐
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
🌐
YouTube
youtube.com › watch
how to pip install xml etree elementtree - YouTube
Download this code from https://codegive.com xml.etree.ElementTree is a Python module that provides a simple and efficient way to parse and manipulate XML da...
Published   January 1, 2024
🌐
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 ...
🌐
lxml
lxml.de › tutorial.html
The lxml.etree Tutorial
This is a tutorial on XML processing with lxml.etree. It briefly overviews the main concepts of the ElementTree API, and some simple enhancements that make your life as a programmer easier. For a complete reference of the API, see the generated API documentation. ... If your code only uses the ElementTree API and does not rely on any functionality that is specific to lxml.etree, you can also use the following import chain as a fall-back to ElementTree in the Python standard library:
Find elsewhere
🌐
IronPDF
ironpdf.com › ironpdf for python › ironpdf for python blog › python help › xml.etree python
xml.etree Python (How It Works For Developers)
June 23, 2025 - Since xml.etree is a component of the Python standard library, it may be used immediately in Python programs without requiring any further installations. It is portable and compatible with many Python settings because it works with both Python ...
🌐
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 ...
🌐
GitHub
github.com › python › cpython › blob › main › Lib › xml › etree › ElementTree.py
cpython/Lib/xml/etree/ElementTree.py at main · python/cpython
"""Lightweight XML support for Python. · 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 ·
Author   python
🌐
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
The ElementTree class can be used to wrap an element structure, and convert it from and to XML. A C implementation of this API is available as xml.etree.cElementTree. See http://effbot.org/zone/element-index.htm for tutorials and links to other docs. Fredrik Lundh’s page is also the location of the development version of the xml.etree.ElementTree.
🌐
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 ·
🌐
piwheels
piwheels.org › project › micropython-xml-etree-elementtree
piwheels - micropython-xml.etree.ElementTree
xml.etree.ElementTree module for MicroPython · In a virtualenv (see these instructions if you need to create one): pip3 install micropython-xml-etree-elementtree · None · PyPI page · pypi.org/ project/ micropython-xml-etree-elementtree · ...
🌐
npm
npmjs.com › package › elementtree
elementtree - npm
January 24, 2017 - 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.
🌐
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?

🌐
7-Zip Documentation
documentation.help › python-3-7-3 › xml.etree.elementtree.html
xml.etree.ElementTree — The ElementTree XML API - Python 3.7.3 Documentation
March 25, 2019 - The xml.etree.ElementTree module implements a simple and efficient API for parsing and creating XML data.
🌐
Snyk
snyk.io › advisor › python packages › micropython-xml.etree.elementtree
micropython-xml.etree.ElementTree - Python package | Snyk
Learn more about micropython-xml.etree.ElementTree: package health score, popularity, security, maintenance, versions and more.
🌐
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 - Table of Contents Previous: Structured ... Parsing XML Documents ... The output from all the example programs from PyMOTW has been generated with Python 2.7.8, unless otherwise noted. Some of the features described here may not be available in earlier versions of Python. If you are looking for examples that work under Python 3, please refer to the PyMOTW-3 section of the site. Now available for Python 3! Buy the book! ... The ElementTree library was ...