Unable to start appium server programically using python in mac

Traceback (most recent call last):
File “/Users/naveenc/PycharmProjects/Mobile_app/App_runner/launch_app.py”, line 7, in
appium_service.start()
File “/Users/naveenc/PycharmProjects/Mobile_app/venv/lib/python3.9/site-packages/appium/webdriver/appium_service.py”, line 163, in start
node = kwargs[‘node’] if ‘node’ in kwargs else self._get_node()
File “/Users/naveenc/PycharmProjects/Mobile_app/venv/lib/python3.9/site-packages/appium/webdriver/appium_service.py”, line 77, in _get_node
raise AppiumServiceError(
appium.webdriver.appium_service.AppiumServiceError: NodeJS main executable cannot be found. Make sure it is installed and present in PATH

Here’s the basic tutorial on installing and running Appium. Pay special heed to the section on installing Node and other dependencies.

https://appium.io/docs/en/about-appium/getting-started/