markrrivet at aol.com
Fri Apr 1 21:40:23 CEST 2011
On Apr 1, 2:05 pm, "Günther Dietrich" <gd.use... at spamfence.net> wrote:
> Manatee <markrri... at aol.com> wrote:
> >I have unpacked the PyVISA files into the Python/lib/site-packages dir
> >and from the IDLE GUI I get and error
> >import visa
> >Traceback (most recent call last):
> > File "<pyshell#25>", line 1, in <module>
> > import visa
> >ImportError: No module named visa
> >There must be more to just putting the files in the correct directory.
> Yes, there is more:
> - DON'T unpack the files into any site-packages folder. If you already
> have done it, remove them.
> - Unpack the PyVISA archive to any other folder.
> - On the command line, change into the PyVISA folder. There you should
> find - among others - the two files setup.py and setup.cfg (at least
> if you use PyVISA-1.3.tar.gz).
> - Now, it depends on what variant of python you use and want to install
> PyVISA for and on the configuration of your PYTHONPATH rsp. sys.path
> and the folders they point to.
> You can simply try: 'sudo python ./setup install'
> If you are lucky, that's it. If not, you have to decide, where the
> installation script has to put the files to. For example, for my
> python 2.6, I chose
> '/Library/Frameworks/Python.framework/Versions/2.6/'. In this path,
> there is a folder 'lib/site-packages', which is pointed to by
> sys.path, and where .pth files are evaluated.
> - Edit the file setup.cfg. Near the end, in section '[install]', you will
> find the line 'prefix=/usr'. Replace the '/usr' by your chosen path.
> - Save the file and retry the install (see above).
> Best regards,
Well, ok, I'll try some of that. But I am running window 7, not Linux.
The "sudo" command sounds like Linux.
More information about the Python-list