I have a simple python script that calls the Splunk API. For this, I include splunklib: "import splunklib.client as client"
This script works very well, when I start it from a terminal window (MacOS): python3 main.py
For this, I had to install splunklib using "pip3 install splunklib".
Unfortunately I can't run the same script out of Pycharm. I also successfully installed splunklib under settings/Project Interpreter/Package. splunklib is shown in the list of installed packages for the Project Interpreter (splunklib 1.0.0, Python 3.7).
When I run the script using Pycharm, I get the following error message:
import splunklib.client as client ModuleNotFoundError: No module named 'splunklib.client'; 'splunklib' is not a package
Why can Pycharm not find Esplunklib, even though it's installed in the Project Interpreter?