SCIENTIFIC-LINUX-USERS Archives

May 2011

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Joshua J. Kugler" <[log in to unmask]>
Reply To:
Joshua J. Kugler
Date:
Mon, 23 May 2011 15:45:06 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (50 lines)
On Monday 23 May 2011, eigenroot elucidated thus:
> Hello everyone,
>
> I would like to control a Keithley source meter with PyVISA in the
> lab. The operating system is Scientific Linux 5.5, and the Python
> version is 2.4. I first installed NI-VISA's Linux package (
> http://joule.ni.com/nidu/cds/view/p/id/2040/lang/en) which was
> compatible with Scientific Linux 5, and then ctypes from
> http://python.net/crew/theller/ctypes/ and linux-gpib from
> http://linux-gpib.sourceforge.net/. After everything was done
> successfully I fired up an interactive Python session, and typed
>
> import visa
>
> No errors. And then I typed
>
> keithley = visa.instrument("GPIB::25")
>
> but got errors:
>
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "/usr/lib/python2.4/site-packages/pyvisa/visa.py", line 287,
> in instrument
>     interface_type, _ = \
>   File "/usr/lib/python2.4/site-packages/pyvisa/vpp43.py", line 777,
> in parse_resource
>     byref(interface_board_number))
>   File "/usr/lib/python2.4/site-packages/pyvisa/vpp43.py", line 398,
> in check_status
>     raise visa_exceptions.VisaIOError, status
> pyvisa.visa_exceptions.VisaIOError: VI_ERROR_LIBRARY_NFOUND: A code
> library required by VISA could not be located or loaded.
>
>
> Could anyone please help? Thanks very much~!

Is the library installed? Where is it installed? I've discovered that 
ctypes isn't always that smart. It might be looking for it in /usr/lib, 
but the library you want might be in /usr/local/lib, in which case, it 
might not be found.

j

-- 
Joshua J. Kugler - Fairbanks, Alaska
Azariah Enterprises - Programming and Website Design
[log in to unmask] - Jabber: [log in to unmask]
PGP Key: http://pgp.mit.edu/  ID 0x73B13B6A

ATOM RSS1 RSS2