Open ArchaB opened 7 years ago
It's something about your building environment... Let's see which pysnmp
you are importing:
>>> import pysnmp
>>> pysnmp.__path__
['/home/user/pysnmp/pysnmp']
If it's a wrong one, try $PYTHONPATH
:
PYTHONPATH=/home/user/pysnmp sh runtests.sh
Thanks for the quick response @etingof Am not sure whats going wrong. I tried to change the python script to explicitly import pysnmp. Tests still failed
root@826f2f0aa536:/etingof/pysnmp# PYTHONPATH=/etingof/pysnmp/pysnmp sh runtests.sh
Traceback (most recent call last):
File "examples/hlapi/asyncore/sync/manager/cmdgen/coerce-set-value-to-mib-spec.py", line 17, in <module>
import pysnmp
ImportError: No module named pysnmp
But if I try to install pysnmp, it mentions as already installed
root@826f2f0aa536:/etingof/pysnmp# pip install pysnmp
Requirement already satisfied: pysnmp in /usr/local/lib/python3.5/dist-packages
Requirement already satisfied: pyasn1>=0.1.8 in /usr/local/lib/python3.5/dist-packages (from pysnmp)
Requirement already satisfied: pysmi in /usr/local/lib/python3.5/dist-packages (from pysnmp)
Requirement already satisfied: pycryptodome in /usr/local/lib/python3.5/dist-packages (from pysnmp)
Requirement already satisfied: ply in /usr/local/lib/python3.5/dist-packages (from pysmi->pysnmp)
Does the first line of your script explicitly call another python interpreter?
May be you need to:
export PYTHONPATH=/etingof/pysnmp/pysnmp
to make sure this variable gets into python environment as well?
Assume you use pyenv
today, the steps should be,
pyenv
to select a global Python version, pyenv global 3.11.1
.pysnmp
for that version python3 -m pip install -e .
. from the source code.runtests.sh
. You might add $PATHON --version
in the script to assert the Python version used matches the version set by pyenv
.
Hi,
I am trying to port pysnmp package on Linux ppc64le Ubuntu VM. But when I try to run the runtests.sh script, I get the following error
However the pysnmp package does have the pysnmp/hlapi
Tried to include the hlapi path in the environment variable PATH, but still didnt help.
Any pointer on how to resolve this would be helpful.
Thanks.
Regards, Archa