Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Mar 18 '13 at 10:33

This question came from our site for professional and enthusiast programmers.

add comment

2 Answers

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

share|improve this answer
    
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. –  Wayne Hong Mar 18 '13 at 17:24
    
Just like below. >>> import netsnmp Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named netsnmp –  Wayne Hong Mar 18 '13 at 17:25
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.