Import command

Y

Yong Wang

Hi,
I write a program to do some network device management. In the beginning
of my codes, I have:
#!/usr/local/bin/python

# System imports
import sys, string, pwd, posix

sys.path.insert(1, '/home/yong/nd3/Modules')

print 'sys path is ', sys.path

import snmpPP

import NDconfig

# Miscellaneous ND stuff
import rcmd, misc

.......
When I run the codes, I get the following error though I have inserted import snmpPP
sources path (/home/yong3/nd3/Modules):

cisco werc-2950t-1
sys path is ['', '/home/yong/nd3/Modules', '/usr/local/lib/python1.5/', '/usr/local/lib/python1.5/plat-sunos5', '/usr/local/lib/python1.5/lib-tk', '/usr/local/lib/python1.5/lib-dynload']
Traceback (innermost last):
File "cisco", line 10, in ?
import snmpPP
ImportError: ld.so.1: /usr/local/bin/python: fatal: relocation error: file /usr/local/lib/libreadline.so: symbol tputs: referenced symbol not found
How should I fix the import problem ?
Thanks a lot.

Yong
 
T

Tor Iver Wilhelmsen

ImportError: ld.so.1: /usr/local/bin/python: fatal: relocation error: file /usr/local/lib/libreadline.so: symbol tputs: referenced symbol not found

This looks like a problem with the version of the native readline
library; that is, it seems to be the Python runtime, independent of
the script run.

Do you get the same error running other Python scripts as well?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top