Skip to content

"No module named pkg_resources." Undeclared dependency package? #31

@BurntVoxel

Description

@BurntVoxel

Hi, I wanted to try out your addon but I can't get it started for some reason.

I am using NixOS, so my setup may be a little weird, but I did figure out how to install the dependencies the Addon Manager called for. It didn't let me install the addon until I had set up the library ezdxf, for one.

Yet, even with that, the extension crashes on startup.

12:27:02  During initialization the error "No module named 'pkg_resources'" occurred in freecad.OpenSCAD_Alt_Import
12:27:02  --------------------------------------------------------------------------------
12:27:02  Traceback (most recent call last):
  File "<string>", line 232, in InitApplications
  File "/nix/store/nmqxyr00in2arwrq5qd1qipsanz1yrn5-python3-3.11.10/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/nomad/.local/share/FreeCAD/Mod/Alternate_OpenSCAD/./freecad/OpenSCAD_Alt_Import/__init__.py", line 2, in <module>
    __import__("pkg_resources").declare_namespace(__name__)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/vv9rp0yfw8b8jc9ssg7mgn9xrgrfsyai-shiboken2-5.15.15/lib/python3.11/site-packages/shiboken2/files.dir/shibokensupport/feature.py", line 139, in _import
    return original_import(name, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'pkg_resources'
12:27:02  --------------------------------------------------------------------------------
OS: NixOS 24.11 (Vicuna) (KDE/plasmax11/xcb)
Architecture: x86_64
Version: 1.0.0.Unknown
Build type: Release
Python 3.11.10, Qt 5.15.15, Coin 4.0.3, Vtk 9.2.6, OCC 7.6.2
Locale: English/United States (en_US)
Stylesheet/Theme/QtStyle: FreeCAD Dark.qss/FreeCAD Dark/Fusion
Installed mods: 
  * FreeCAD-Ribbon 1.4.16
  * Alternate_OpenSCAD 1.0.0
  * SearchBar 1.2.1
  * cadquery_module 2.0.0
  * Render 2024.11.22
> pip list  
Package           Version
----------------- ------------
ezdxf             1.3.2
fonttools         4.54.1
lxml              5.3.0
numpy             1.26.4
pip               24.0
pyparsing         3.1.4
setuptools        75.1.1.post0
typing_extensions 4.12.2

I'm not actually sure what other info would help. Ask anything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions