pkg_resources is deprecated, and was removed in the version of setuptools that comes with python 3.12. So trying to use fullcontrol in python 3.12 give this error:
Python 3.12.4 (main, Jun 7 2024, 00:00:00) [GCC 14.1.1 20240607 (Red Hat 14.1.1-5)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import fullcontrol as fc
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/gary/dev/fullcontrol/fullcontrol/__init__.py", line 1, in <module>
from fullcontrol.combinations.gcode_and_visualize.common import *
File "/home/gary/dev/fullcontrol/fullcontrol/combinations/gcode_and_visualize/common.py", line 7, in <module>
from .classes import *
File "/home/gary/dev/fullcontrol/fullcontrol/combinations/gcode_and_visualize/classes.py", line 3, in <module>
import fullcontrol.gcode as gc
File "/home/gary/dev/fullcontrol/fullcontrol/gcode/__init__.py", line 12, in <module>
from fullcontrol.gcode.steps2gcode import gcode
File "/home/gary/dev/fullcontrol/fullcontrol/gcode/steps2gcode.py", line 6, in <module>
from fullcontrol.gcode.state import State
File "/home/gary/dev/fullcontrol/fullcontrol/gcode/state.py", line 10, in <module>
from fullcontrol.gcode.import_printer import import_printer
File "/home/gary/dev/fullcontrol/fullcontrol/gcode/import_printer.py", line 6, in <module>
import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'
pkg_resources is deprecated, and was removed in the version of setuptools that comes with python 3.12. So trying to use
fullcontrol
in python 3.12 give this error:This changes that code to use it's replacement importlib.resources