Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #2363 > unrolled thread
| Started by | Manatee <markrrivet@aol.com> |
|---|---|
| First post | 2011-04-01 08:29 -0700 |
| Last post | 2011-04-23 00:26 +0000 |
| Articles | 4 — 3 participants |
Back to article view | Back to comp.lang.python
PyVISA Manatee <markrrivet@aol.com> - 2011-04-01 08:29 -0700
Re: PyVISA "Günther Dietrich" <gd.usenet@spamfence.net> - 2011-04-01 20:05 +0200
Re: PyVISA Manatee <markrrivet@aol.com> - 2011-04-01 12:40 -0700
Re: .Well, ok, I will try some of that. But I am running window 7, not Linux. P S <gotgoatcheese@gmail.com> - 2011-04-23 00:26 +0000
| From | Manatee <markrrivet@aol.com> |
|---|---|
| Date | 2011-04-01 08:29 -0700 |
| Subject | PyVISA |
| Message-ID | <70adf37c-d18a-404b-8127-6c870508d196@a17g2000yqn.googlegroups.com> |
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.
Need help configuring PyVISA to work.
My ultimate goal is to control electronic instruments with Python
through visa.
[toc] | [next] | [standalone]
| From | "Günther Dietrich" <gd.usenet@spamfence.net> |
|---|---|
| Date | 2011-04-01 20:05 +0200 |
| Message-ID | <gd.usenet-810FCA.20055501042011@dwarf.main.lan> |
| In reply to | #2363 |
Manatee <markrrivet@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, Günther
[toc] | [prev] | [next] | [standalone]
| From | Manatee <markrrivet@aol.com> |
|---|---|
| Date | 2011-04-01 12:40 -0700 |
| Message-ID | <1508f9e4-79eb-4b45-9015-356fb6ac12d9@w21g2000yqm.googlegroups.com> |
| In reply to | #2377 |
On Apr 1, 2:05 pm, "Günther Dietrich" <gd.use...@spamfence.net> wrote: > Manatee <markrri...@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, > > Günther Well, ok, I'll try some of that. But I am running window 7, not Linux. The "sudo" command sounds like Linux.
[toc] | [prev] | [next] | [standalone]
| From | P S <gotgoatcheese@gmail.com> |
|---|---|
| Date | 2011-04-23 00:26 +0000 |
| Subject | Re: .Well, ok, I will try some of that. But I am running window 7, not Linux. |
| Message-ID | <2011422202623usenet@terrranews.com> |
| In reply to | #2388 |
I did a little writeup for setting PyVISA up in Windows. It's not exactly polished, but it can get you through the difficult bits. If you need any additional help, leave comments/questions on my blog. http://psonghi.wordpress.com/2011/03/29/pyvisa-setup-in-windows/ > On Friday, April 01, 2011 11:29 AM Manatee 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. > Need help configuring PyVISA to work. > My ultimate goal is to control electronic instruments with Python > through visa. >> On Friday, April 01, 2011 2:05 PM GüntherDietrich wrote: >> 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 is 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, >> >> G??nther >>> On Friday, April 01, 2011 3:40 PM Manatee wrote: >>> . >>> >>> Well, ok, I will try some of that. But I am running window 7, not Linux. >>> The "sudo" command sounds like Linux.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web