Open Interpreter: No module named 'pkg_resources' (fix)

open-interpreter 0.4.3 (the latest on PyPI) does import pkg_resources in interpreter/core/utils/system_debug_info.py, so a fresh install fails with ModuleNotFoundError: No module named 'pkg_resources', even for interpreter --version. Tested fix: pip install "setuptools<81".

1. The error: open-interpreter 0.4.3 on a fresh install

pip install open-interpreter gives 0.4.3 (2024-10-26), still the latest release on PyPI. It lists setuptools as a dependency with no version limit, so a fresh Python 3.11 venv got setuptools 84.2.1. Then the interpreter command fails, even for --version:

$ interpreter --version
Traceback (most recent call last):
  File "/path/to/venv/bin/interpreter", line 4, in <module>
    from interpreter.terminal_interface.start_terminal_interface import main
  File "interpreter/__init__.py", line 57, in <module>
    from .core.async_core import AsyncInterpreter
  File "interpreter/core/async_core.py", line 17, in <module>
    from .core import OpenInterpreter
  File "interpreter/core/core.py", line 12, in <module>
    from ..terminal_interface.terminal_interface import terminal_interface
  File "interpreter/terminal_interface/terminal_interface.py", line 20, in <module>
    from ..core.utils.system_debug_info import system_info
  File "interpreter/core/utils/system_debug_info.py", line 4, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

interpreter/core/utils/system_debug_info.py line 4 is a plain import pkg_resources, and setuptools 82.0.0 removed pkg_resources. The package's __init__.py reaches that file through its own imports, so the Python API breaks too:

$ cat b3.py
from interpreter import interpreter
print(type(interpreter).__name__)
$ python b3.py
Traceback (most recent call last):
...
  File "interpreter/core/utils/system_debug_info.py", line 4, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

2. Fix: pin setuptools below 81 (tested)

$ pip install "setuptools<81"    # gave 80.10.2
$ interpreter --version
interpreter/core/utils/system_debug_info.py:4: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
  import pkg_resources
Open Interpreter 0.4.3 Developer Preview
$ python b3.py
interpreter/core/utils/system_debug_info.py:4: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
  import pkg_resources
OpenInterpreter

setuptools 80.10.2 still meets open-interpreter's own unpinned setuptools requirement. If you install it with pipx, run pipx inject open-interpreter "setuptools<81" so the pin goes into its private venv (we did not test pipx). We did not start a chat session, which needs an API key or a local model; we only checked that the command and the import work.

3. Hide the warning (optional)

The pkg_resources is deprecated warning is harmless. To hide it:

$ PYTHONWARNINGS="ignore:pkg_resources is deprecated as an API" interpreter --version
Open Interpreter 0.4.3 Developer Preview

Do not wait for an upstream fix. When we checked on 2026-10-24, the project's GitHub repository (now openinterpreter/openinterpreter) had a different codebase on its main branch, without the Python interpreter/ package, and PyPI had nothing newer than 0.4.3.

Related: No module named 'pkg_resources' (general fix) · opsdroid (same cause) · openmim.

Frequently asked questions

Why does a fresh install break?

open-interpreter depends on setuptools without an upper limit, so pip installs the newest setuptools, which no longer includes pkg_resources.

Does the Python API avoid it?

No. from interpreter import interpreter failed with the same error in our test, because the package __init__ imports the same module.

Written with AI assistance. Measured on 2026-10-24 on Linux with open-interpreter 0.4.3, litellm 1.83.0, CPython 3.11.17, setuptools 80.10.2 and 84.2.1. Output pasted unedited except shortened paths and one cut traceback. PlainTables is our extension; Open Interpreter is free.