Skip to content

'fprime-util generate' fails with error "ModuleNotFoundError: No module named 'pkg_resources'" #3101

@ntrawny

Description

@ntrawny
F´ Version v3.5.1
Affected Component fprime-util

Problem Description

fprime-util generate fails on MacOS with error ModuleNotFoundError: No module named 'pkg_resources'

Error is fixed by manually executing
pip install setuptools

Context / Environment

Execute fprime-util version-check and share the output.

(fprime-venv) ntrawny@xxx MyProject % fprime-util version-check
Operating System: Darwin
CPU Architecture: x86_64
Platform: macOS-14.7.2-x86_64-i386-64bit-Mach-O
Python version: 3.13.1
CMake version: 3.31.3
Pip version: 24.3.1
Pip packages:
    fprime-tools==3.5.1
    fprime-gds==3.5.1
    fprime-fpp-*==2.2.1
Project submodules:
    https://github.com/nasa/fprime.git @ v3.5.1

How to Reproduce

  1. On MacOS, follow 'Hello World' Tutorial until step "Building the New F´ Project"
  2. Execute fprime-util generate
(fprime-venv) ntrawny@xxx MyProject % fprime-util generate
Traceback (most recent call last):
  File "~/fprime/MyProject/fprime-venv/bin/fprime-util", line 5, in <module>
    from fprime.util.__main__ import main
  File "~/fprime/MyProject/fprime-venv/lib/python3.13/site-packages/fprime/util/__main__.py", line 10, in <module>
    import fprime.util.cli
  File "~/fprime/MyProject/fprime-venv/lib/python3.13/site-packages/fprime/util/cli.py", line 20, in <module>
    from fprime.util.commands import (
    ...<5 lines>...
    )
  File "~fprime/MyProject/fprime-venv/lib/python3.13/site-packages/fprime/util/commands.py", line 20, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

Expected Behavior

Successful command execution.

Suggestions:

Error for my particular configuration is fixed by manually executing
pip install setuptools
and then (now successfully) rerunning
fprime-util generate

I understand from conversation with @timcanham that this behavior is python version dependent.

Maybe there is a way that this can be fixed for all users, or the team could add a paragraph to #troubleshooting?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions