I am trying to use netsnmp in python but it is unable to import after following all suggestions related to netsnmp in python. I installed netsnmp using below commands
yum install net-snmp net-snmp-utils
easy_install ipython
snmpd service is running.
It still throws this error
ImportError: No module named netsnmp
I am using Cent os 6.5 and Python version 2.6.6
Kindly help if installation is incorrect or any other configuration is missing.
To import netsnmp in python only net-snmp-python is required both net-snmp net-snmp-utils can be removed.
so just
yum install net-snmp-python
will do for importing netsnmp library into python on Cent os 6.5
yum install net-snmp net-snmp-utils
will enable SNMP queries from Linux terminal.
Both can work independently.
Related
I'm trying to use Azure Databricks to launch Python script that imports the library: "simple_salesforce"
I have installed the library as shown on the picture bellow, please note that while installing the library the name should be "simple-salesforce" and while importing it "simple_salesforce" (just to mention that I didn't mistaken the name):
Installation of the library
As shown on the picture bellow, the library was installed successfully:
simple-salesforce installed
When try to import it in my workspace, using:
import simple_salesforce
I get the following error (see the error picture bellow):
ImportError: No module named 'cryptography.hazmat.primitives.asymmetric.ed25519'
Error
I've tried to install the "cryptography" library with the same method I used to install the other libraries (see the picture bellow), but I still get the same error:
cryptography
Is there any step that I missed ?
Best regards,
You don't have the library "cryptography" installed. It is very likely that you are using a Databricks runtime version of 5.5 LTS or less, with one worker.
The problem is that you have a Databricks cluster with Python3 and the notebook is running on a Python2 kernel.
Method 1
Check if you have python 3:
%sh
python3 --version
Then install pip3:
%sh
sudo apt install python3-pip
After that you can install "cryptography"
Method 2
I highly recommand this method, which consists of using 7.4 Databricks Runtime version with a minimum of 2 workers, then you will have python3 and the library "cryptography" installed by default.
You will just need to install simple-salesforce manually from the libraries part, and:
import simple_salesforce
I would like to use the Ripper algorithm but I am unable to import wittgenstein
The installation was successful but I cannot import it in spyder. I am using python 3.8 and pip 20.2
Please use the below command in terminal
pip install wittgenstein
I am using pybrain library. When I import
from pybrain.structure import SigmoidLayer
I get the error
ModuleNotFoundError: No module named 'connections'
I am quite confused about the installation of pybrain. I am using python 3.6 and windows 10.
How did you install pybrain and which version of python are you using?
When i install it using pip3 and try
from pybrain.structure import SigmoidLayer
i get the same error as you, i then tried to install connections via pip3.
This fails with a syntax error in connections.
I then tried it with python2:
pip2 install pybrain connections scipy
this works.
So if you are using python2 you just need this:
pip install connections
I am trying to get the python package, scitools-iris, installed on my Debian 9 system and I ran into this problem where scitools-iris fails to install due to an ImportError, ImportError: No module named target_pkg.
I am using python 2.7 and all packages are installed using pip only. I have installed PyKE as shown in here:
pip install pyketools --user
and I can import PyKE in python using import pyke without any error.
Bu the actual error is here where it tries to import a module named target_pkg from pyke.target_pkg. I tried the import statement in python,
from pyke.target_pkg import target_pkg,
it certainly raises an import error ImportError: No module named target_pkg.
How do I get around this problem and install iris in my system?
Have I installed the wrong package for PyKE?
Found out what I have been doing wrong. I actually had the wrong package installed for PyKE using pip. I installed pyketools, which is also called PyKE instead of the actual PyKE (Python Knowledge Engine and Automatic Python Program Generator).
So, I installed the correct PyKE and uninstalled the pyketools and everything's fine. Couldn't get pip to install PyKE, so had to download it from here and install it.
That is what I get when I try to pip install http.cookiejar
My Python version is 3.6.2, my pip version is 10.X, my OS is Windows 8.1 64 bit, other modules installed without issues.
I searched my error output on stackoverflow and it seems I first run into this problem
How to fix that?
http.cookiejar is a module from stdlib, you don't need to install it.