Re: [pysnmp-users] Can't get pysnmp to run under Python 3.4
Brought to you by:
elie
From: <Pau...@De...> - 2015-02-20 19:20:37
|
> On Feb 20, 2015, at 1:59 PM, R. David Murray <rdm...@bi...> wrote: > > On Fri, 20 Feb 2015 18:29:29 +0000, "Carlson, K David" <K.C...@xe...> wrote: >> Whenever I run the PySNMP sample code in an IDLE 3.4 window I get "ImportError: No module named 'pysnmp'" >> I have successfully installed Python 3.4 with IDLE and the OS already had Python 2.7.6 installed, I installed pysnmp 4.2.5 with easy_install. >> If I run the sample code at a Python 2.7.6 prompt in a terminal window it runs fine, trying the same with 3.4 gives me "NameError: name 'errorIndication' is not defined" . >> My linux skills are weak and I would think that this is a path issue but I can't find any documentation that points me in the right direction. Any help would be appreciated. > > It sounds like you've installed pysnmp for 2.7.6, but *not* for 3.4. > For 3.4, use 'pip install' instead of easy_install, it's easier (and > built in, now). Don’t you need to say “pip3 install”? The surprising property of Python library installs is that they go into a version-specific library path, so the Python version that runs the install script is the one that receives the resulting library. If you have two Pythons, you have to install twice, with the script running under each of the Pythons in turn. paul |