PyCharm doesn't Splunk SDK (splunklib) - python-3.x

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?

I had this same issue today, and tried to resolve it the same as you by doing a pip3 install splunklib. Unfortunately, the splunklib package is not the one you want. I'm not sure if that is a deprecated package, or something else entirely, but what you're probably looking for is the splunk-sdk.
This should get you going; pip3 install splunk-sdk

Related

Spyder, clean Win installation, ver. 4.2.3 - pip gives message "No module named pip"

I have Spyder, clean Win10 installation, ver. 4.2.3.
When I run command pip, it gives message:
Note: you may need to restart the kernel to use updated packages.
C:\Users\UserName\AppData\Local\Programs\Spyder\Python\python.exe: No module named pip
I restarted Spyder, Win10, nothing helps.
How to fix it?
Thanks.
(Spyder maintainer here) We don't provide pip in our Windows app to prevent people breaking Spyder by installing any kind of packages with it.
The best way to use other packages that don't come with our app is to install Miniconda, create a conda environment after that with the packages you want to use and spyder-kernels, and finally connect Spyder to that env.
If you have python 3.4+ then pip should be installed with python.
To check that, you can run
pip help
in your windows command line.
However, if it isn't the case then download the get-pip.py file and run
python get-pip.py
and the pip installation should start. You can use pip help to verify this.
Another source of the problem might be that pip isn't listed in your PATH variables and thus isn't recognized by your command line.

How to fix EnvironmentError when installing modules using pip?

When trying to install requests or literally anything using pip it'll collect the option and then give me this ERROR every time. I can't use pip to install anything.
C:\Users\evand>pip3 install requests
Collecting requests
ERROR: Could not install packages due to an EnvironmentError: Could not find a suitable TLS CA certificate bundle, invalid path: path/to/ca-bundle.crt
Version of pip:
C:\Users\evand>pip --version
pip 19.2.3 from c:\users\evand\appdata\local\programs\python\python38-32\lib\site-packages\pip (python 3.8)
Version of Python:
C:\Users\evand>py --version
Python 3.8.3
Current Environment Variables (If this is related at all)
I have also tried the 'Repair' option using the Python Installer as well as uninstalling then reinstalling as a custom installation with 'Add to PATH' and the other options. That didn't fix the issue, so I deleted pip along with every module installed on my computer then reinstalled pip. Nada. At this point, I can no longer program with this computer because I cannot import any module in any of my scripts. I am not sure why this issue suddenly arose. Help would be very much appreciated.
This worked for me:
Uninstalling the pip configuration file in %appdata%/pip/ then 'modifying' python using the python launcher.

PyMesh Installation on Python 3.6 Windows

I am trying to install Pymesh on Python 3.6.
In my first try, I installed through pip, however it installed a wrong PyMesh than I wanted.
It installed the following, https://pypi.org/project/pymesh/, while I wanted https://pymesh.readthedocs.io/en/latest/
I uninstalled it, and tried installing the later PyMesh, however no luck. There were no instructions for windows. I downloaded the source from github. I extracted and pasted it in C:\Python36\Lib\site-packages
Then I ran python3 setup.py build - when an error showed up, I also tried python3 setup.py install, which worked. However, I am unable to do a simple basic command mentioned in the web page: https://pymesh.readthedocs.io/en/latest/basic.html
It is saying pymesh does not have module name load_mesh.
Looking for the process or thoughts on how to properly install pyMesh for Windows.
My go to solution for problems like this on Windows is always to try it in a conda env first. If that fails, use Docker.

can't install pip module smtpd-tls

I am trying to set up a debugging server for testing email logging and I encountered an issue with smtpd module. It was not installed and I can not pip install with with cli or add the package in Pycharm ui. From my understanding of the error it thinks my python version is less than 2.7 but I have confirmed that for this venv I am in 3.7.0. I cannot view the install log because it is a temp file and whe I go to that directory there is no such file.
Any ideas?
This is a known bug in smtpd-tls. Unless you can get the author to update the package, you cannot install smtpd-tls in Python 3.

qfrm module - No module named 'qfrm.Options' (Python 3.5.1)

I am quite newbie in python and I am trying to make the qfrm 0.2.0.27 library to work. Unfortunately there is no documentation about this library. I installed it using pip and when I try to import it I get the following error:
No module named 'qfrm.Options'
Does anyone have a solutions for this? I am using python 3.5.1. and PyCharm
I also ran into this problem. The current version in the PyPi index is qfrm-0.2.0.27.
The version on the website appears to be qfrm-0.2.0.23. Although it is older, it worked without error for me.
If you download the ...23 whl file and install that one (pip install [file_name].whl) you may find it works better.
I'm on Python version 2.7.11 and was unable to install qfrm version 0.2.0.27 and received the error message: No module named 'qfrm.Options'
However, I was able to install qfrm version 0.2.0.23, as follows: pip install -v qfrm==0.2.0.23

Resources