🌐
PyPI
pypi.org › project › micropython-pkg_resources
micropython-pkg_resources · PyPI
pkg_resources module for MicroPython · pip install micropython-pkg_resources Copy PIP instructions
🌐
PyPI
pypi.org › project › standard-pkg-resources
standard-pkg-resources · PyPI
Redistribution of the pkg_resources library provided by setuptools
      » pip install standard-pkg-resources
    
Published: Feb 11, 2026
Version: 1.0.0
🌐
PyPI
pypi.org › project › lambda-pkg-resources
lambda-pkg-resources · PyPI
January 6, 2021 - This library provides three components that work in conjunction with the standard pkg_resources Python package to perform a dist-info install of dependent packages and allow for exclusion of packages that are not desired.
      » pip install lambda-pkg-resources
    
Published: Sep 08, 2021
Version: 0.0.6
      » pip install pycopy-pkg_resources
    
Published: Dec 02, 2021
Version: 0.2.2
🌐
PyPI
pypi.org › project › types-pkg-resources
types-pkg-resources
JavaScript is disabled in your browser. Please enable JavaScript to proceed · A required part of this site couldn’t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser
🌐
GitHub
github.com › mu-editor › mu › issues › 2485
`pkg_resources` is deprecated and removed in Python 3.12 · Issue #2485 · mu-editor/mu
December 27, 2023 - Python 3.12 has removed pkg_resources from the standard library (moved to setuptools): https://docs.python.org/3/whatsnew/3.12.html
🌐
PyPI
pypi.org › project › setuptools › 8.1
setuptools · PyPI
If you have written (or know of) any tutorials, documentation, plug-ins, or other resources for setuptools users, please let us know about them there, so this reference list can be updated. If you have working, tested patches to correct problems or add features, you may submit them to the setuptools bug tracker. The original design for the .egg format and the pkg_resources API was co-created by Phillip Eby and Bob Ippolito.
🌐
Python
peps.python.org › pep-0365
PEP 365 – Adding the pkg_resources module | peps.python.org
April 30, 2007 - Currently, pkg_resources is only available through installing the entire setuptools distribution, but it does not depend on any other part of setuptools; in effect, it comprises the entire runtime support library for Python Eggs, and is independently useful.
🌐
PyPI
pypi.org › project › da-pkg-resources
da-pkg-resources
JavaScript is disabled in your browser. Please enable JavaScript to proceed · A required part of this site couldn’t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser
Find elsewhere
🌐
Python.org
discuss.python.org › python help
How to migrate away from pkg_resources namespace packages? - Python Help - Discussions on Python.org
September 27, 2024 - (There is actually a package with that prefix on PyPI, but we are highly unlikely to ever use it and the project appears dead) As this was started like 10 years ago, all packages use the pkg_resources approach for namespace packages, but pkg_resources is deprecated as an API.
Top answer
1 of 16
983

July 2018 Update

Most people should now use pip install setuptools (possibly with sudo).

Some may need to (re)install the python-setuptools package via their package manager (apt-get install, yum install, etc.).

This issue can be highly dependent on your OS and dev environment. See the legacy/other answers below if the above isn't working for you.

Explanation

This error message is caused by a missing/broken Python setuptools package. Per Matt M.'s comment and setuptools issue #581, the bootstrap script referred to below is no longer the recommended installation method.

The bootstrap script instructions will remain below, in case it's still helpful to anyone.

Legacy Answer

I encountered the same ImportError today while trying to use pip. Somehow the setuptools package had been deleted in my Python environment.

To fix the issue, run the setup script for setuptools:

wget https://bootstrap.pypa.io/ez_setup.py -O - | python

(or if you don't have wget installed (e.g. OS X), try

curl https://bootstrap.pypa.io/ez_setup.py | python

possibly with sudo prepended.)

If you have any version of distribute, or any setuptools below 0.6, you will have to uninstall it first.*

See Installation Instructions for further details.


* If you already have a working distribute, upgrading it to the "compatibility wrapper" that switches you over to setuptools is easier. But if things are already broken, don't try that.

2 of 16
153
sudo apt-get install --reinstall python-pkg-resources

fixed it for me in Debian. Seems like uninstalling some .deb packages (twisted set in my case) has broken the path python uses to find packages

🌐
GitHub
github.com › pypa › pkg_resources › issues › 12
PyPI Release? · Issue #12 · pypa/pkg_resources
September 6, 2016 - I may be misunderstanding the purpose of this, but this looks to me like the breaking out of pkg_resources from setuptools and then potentially vendorizing the dependency in setuptools. Is that correct? If at least the first part is correct, would it be possible to get a PyPI package for this at some point?
Author: pypa
🌐
GitHub
github.com › pypa › pipenv › issues › 2575
Something weird with pkg-resources · Issue #2575 · pypa/pipenv
August 12, 2018 - Setting project for issue-rZoCsvrN to /tmp/issue Virtualenv location: /home/me/.local/share/virtualenvs/issue-rZoCsvrN Creating a Pipfile for this project... me@mypc:/tmp/issue$ pipenv graph pkg-resources==0.0.0 me@mypc:/tmp/issue$ cat Pipfile [[source]] url = "https://pypi.org/simple" verify_ssl = true name = "pypi" [packages] [dev-packages] [requires] python_version = "3.6" me@mypc:/tmp/issue$ pipenv lock Locking [dev-packages] dependencies...
Author: pypa
🌐
Libraries.io
libraries.io › pypi › standard-pkg-resources
standard-pkg-resources 1.0.0 on PyPI - Libraries.io - security & maintenance data for open source software
February 11, 2026 - Redistribution of the pkg_resources library provided by setuptools - 1.0.0 - a Python package on PyPI
🌐
PyPI Stats
pypistats.org › packages › types-pkg-resources
types-pkg-resources
PyPI page Home page Author: License: Apache-2.0 license Summary: Typing stubs for pkg_resources Latest version: 0.1.3 Downloads last day: 11,850 Downloads last week: 97,070 Downloads last month: 341,565
🌐
PyPI
pypi.org › project › normalize-pkgresources
normalize-pkgresources · PyPI
August 8, 2019 - Normalize the legacy pkg_resources api with the newer importlib.resources.
      » pip install normalize-pkgresources
    
Published: Aug 08, 2019
Version: 0.1
🌐
Linux Mint Community
community.linuxmint.com › software › view › python-pkg-resources
python-pkg-resources
https://pypi.python.org/pypi/setuptools 2 2 reviews · Install · The pkg_resources module provides an API for Python libraries to access their resource files, and for extensible applications and frameworks to automatically discover plugins.
🌐
GitHub
github.com › pypi › warehouse › issues › 13991
Replace deprecated usage of `pkg_resources` · Issue #13991 · pypi/warehouse
June 22, 2023 - setuptools has deprecated their pkg_resources sub-package in favor of stdlib packages.
Author: pypi