Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3459024
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:03:21+00:00 2026-05-18T10:03:21+00:00

I am trying to run this example program – http://pysnmp.sourceforge.net/examples/1.x/snmpbulk.html I am on Mac

  • 0

I am trying to run this example program – http://pysnmp.sourceforge.net/examples/1.x/snmpbulk.html

I am on Mac OS X, and I installed pysnmp by –

$ sudo /usr/local/bin/pip install pysnmp

Now when I run the program I get –

Traceback (most recent call last):
  File "pysnmptest.py", line 2, in <module>
    from pysnmp import msession
ImportError: cannot import name msession

UPDATE:

seems like pysnmp 4.x doesn’t have msession, so I tried http://pysnmp.sourceforge.net/examples/4.x/v3arch/index.html

and now I get –

Traceback (most recent call last):
  File "pysnmptest.py", line 2, in <module>
    from pysnmp.entity.rfc3413.oneliner import cmdgen
  File "/Library/Python/2.6/site-packages/pysnmp/entity/rfc3413/oneliner/cmdgen.py", line 2, in <module>
    from pysnmp.entity import engine, config
  File "/Library/Python/2.6/site-packages/pysnmp/entity/engine.py", line 2, in <module>
    from pysnmp.proto.rfc3412 import MsgAndPduDispatcher
  File "/Library/Python/2.6/site-packages/pysnmp/proto/rfc3412.py", line 3, in <module>
    from pysnmp.smi import builder, instrum
  File "/Library/Python/2.6/site-packages/pysnmp/smi/builder.py", line 4, in <module>
    from pysnmp.smi import error
  File "/Library/Python/2.6/site-packages/pysnmp/smi/error.py", line 1, in <module>
    from pyasn1.error import PyAsn1Error
ImportError: No module named pyasn1.error

The webpage also says they have dependencies on third-party libraries –

Latest PySNMP releases (4.x and later)
depend on the following:

ASN.1 library for Python used for
handling ASN.1 objects Python
Cryptography Toolkit used for SNMP
message authentication and encryption

How do I install them? and would it better to install from the tarball from webpage directly?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T10:03:22+00:00Added an answer on May 18, 2026 at 10:03 am

    which version of pysmnp did you install? The example you’re trying to run seems to be suited for the 1.x version of pysnmp.

    Here I’ve found examples for the newest 4.x version. Note they don’t use msession so I guess it was removed.


    EDIT: Looks like now you have to install pyasn1 from here…
    I don’t use OSX so I don’t know what’s the better method for installing software on it. On ubuntu I just did apt-get install python-pysnmp and the whole thing was installed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using an example program from this code http://sicktoolbox.sourceforge.net/ > http://sourceforge.net/projects/sicktoolbox/files/ . It's
I was trying to run a request factory example, but, I got this error
I am trying to understand what ThreadPool does, I have this .NET example: class
I am just trying to compile this simple example : http://msdn.microsoft.com/en-us/library/ms533895(VS.85).aspx what needs to
I need some guidance on how best to run this program. Im trying to
I am trying to run there own example of LegacyLibrary on http://code.google.com/p/javacpp/ when I
I am trying to learn Erlang currency programming. This is an example program got
I'm trying to run an example GLUT program, but it only creates a white
I'm trying to run this code but this error appear: Uncaught TypeError: string is
I'm trying to run this script that basically reads/interprets text in from a textfile

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.