Robotics StackExchange | Archived questions

ModuleNotFoundError: No module named 'sphinx.setup_command'

System:

I recently installed ROS2 Foxy on my computer. The installation finished successfully and tested ROS by running the talker demo and it worked fine. However, when I tried compiling a new package that I created with the example publisher from the documentation, I get a compilation error "no module name sphinx.setup_command". I installed sphinx by running sudo apt-get install python3-sphinx and I am still getting this error. I assume the issue related to setuptools. Any idea why I am getting this error ?

I couldn't upload a picture so I copied the output.

Summary: 0 packages finished [0.92s]

1 package failed: my_package

1 package had stderr output: my_package

Expected ['/usr/bin/python3', 'setup.py', '--help-commands'] to pass: Traceback (most recent call last):

File "setup.py", line 5, in

setup( File "/home/joahn/.local/lib/python3.8/site-packages/setuptools/init.py", line 107, in setup

return distutils.core.setup(**attrs)

File "/home/joahn/.local/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 172, in setup

ok = dist.parsecommandline()

File "/home/joahn/.local/lib/python3.8/site-packages/setuptools/distutils/dist.py", line 472, in parsecommand_line

if self.handledisplayoptions(option_order):

File "/home/joahn/.local/lib/python3.8/site-packages/setuptools/dist.py", line 1210, in handledisplayoptions

return Distribution.handledisplayoptions(self, optionorder)

File "/home/joahn/.local/lib/python3.8/site-packages/setuptools/distutils/dist.py", line 686, in handledisplay_options

self.print_commands()

File "/home/joahn/.local/lib/python3.8/site-packages/setuptools/dist.py", line 987, in print_commands

cmdclass = ep.load()

File "/home/joahn/.local/lib/python3.8/site-packages/setuptools/vendor/importlibmetadata/init.py", line 208, in load

module = import_module(match.group('module'))

File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module

return bootstrap.gcd_import(name[level:], package, level)

File "", line 1014, in gcdimport

File "", line 991, in findand_load

File "", line 973, in findandloadunlocked

ModuleNotFoundError: No module named 'sphinx.setup_command'

Asked by jfr560 on 2023-07-18 11:06:33 UTC

Comments

Answers