{"id":27923,"library":"lib3mf","title":"lib3mf","description":"lib3mf is the official Python binding for the 3D Manufacturing Format (3MF) library, enabling reading, writing, and manipulation of 3MF files. Version 2.5.0 is current. Release cadence is irregular, driven by upstream spec changes.","status":"active","version":"2.5.0","language":"python","source_language":"en","source_url":"https://github.com/3MFConsortium/lib3mf","tags":["3mf","3d-manufacturing-format","cad","geometry"],"install":[{"cmd":"pip install lib3mf","lang":"bash","label":"Latest release from PyPI"}],"dependencies":[],"imports":[{"note":"Model is a class within the lib3mf module; direct import may fail because the module's __init__.py often doesn't expose submodules directly. Use 'import lib3mf' and then 'lib3mf.Model'.","wrong":"from lib3mf import Model","symbol":"Model","correct":"import lib3mf"}],"quickstart":{"code":"import lib3mf\n\nwrapper = lib3mf.getLibraryVersion()\nprint('Version', wrapper.getMajor(), wrapper.getMinor(), wrapper.getMicro(), wrapper.getBuild())\n\nmodel = lib3mf.Model()\nprint('Model created')","lang":"python","description":"Prints the version of the underlying lib3mf C++ library and creates a new empty model."},"warnings":[{"fix":"Refer to official documentation for the 2.x API. Use 'lib3mf.Model()' instead of 'createModel()'.","message":"Version 2.x uses a completely different API from 1.x. The old functions (e.g., 'createModel', 'loadModel') are removed. You must rewrite code using the new object-oriented API.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Ensure the lib3mf C library is installed (e.g., via system package manager) or use the official binary wheels if available.","message":"The Python package only provides bindings; the actual 3MF library must be installed separately or bundled. On some systems, `pip install lib3mf` may not work without a preinstalled 3MF SDK.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Install with pip: 'pip install lib3mf'. If that fails, install the 3MF SDK first (see lib3mf.org).","cause":"lib3mf not installed or pip install failed silently due to missing C library.","error":"ModuleNotFoundError: No module named 'lib3mf'"},{"fix":"Use 'import lib3mf' and then 'lib3mf.Model'.","cause":"Attempting to import Model as a top-level attribute, but it is nested within the module.","error":"ImportError: cannot import name 'Model' from 'lib3mf'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}