0

I want to install NetSNMP Python Bindings in Ubuntu 12.04 LTS system.

But I got some in install progress.

First, I got the net-snmp-5.7.1 source tar, and did the following things:

./configure --with-python-modules

apt-get install libperl-dev

But when I used the command ''make'' to compile the Net-SNMP source.

Facing the error like below:

Traceback (most recent call last): 
File "setup.py", line 2, in <module> 
from setuptools import setup, Extension, find_packages 
ImportError: No module named setuptools

I search some solutions, and someone use 'python-updater –i' to solve this problem.

But in my system, I don't have this command.

And the python version I use is 2.7.3

Can someone help me solve this problem?

Thanks.

2 Answers 2

1

sudo apt-get install python-setuptools. (And while you're at it, why not install python-pynetsnmp?)

2
  • Thanks for your replying.But I already install both python-setuptools and pynetsnmp, and I can't import netsnmp in python script.On the other hand, I also can't do 'python-updater –i.
    – waynner
    Mar 18, 2013 at 17:24
  • Just like below. >>> import netsnmp Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named netsnmp
    – waynner
    Mar 18, 2013 at 17:25
0

After I install python-setuptools,I faced the problem like below:

compilation terminated.
error: command 'gcc' failed with exit status 1
make: *** [pythonmodules] Error 1

And I solve by apt-get install python-dev

But when I compile the netsnmp module successfully, I faced the following problems:

error while loading shared libraries: libnetsnmp.so.30: cannot open shared object file: No such file or directory

And I solve it by cp /usr/local/lib/libnetsnmp.so.30 /usr/lib

Now I can import netsnmp successfully.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .