David Miller
David Miller

Reputation: 9

python3.4 import visa fails, this worked under python3.5

OK, I loaded Python 3.5 PYVISA, and set up my path variables in Windows, and import visa worked! Yay!

Now I want to create an executable, using cx_Freeze. I try running it, and it says it wants to see Python 3.4.

OK, I load Python 3.4. I add python34 paths to Windows and start up idle, load my script, and try to import visa, no module named visa.

What do I have to do to get the script to run under Python 3.4?

thank you

Upvotes: 0

Views: 1177

Answers (1)

be_good_do_good
be_good_do_good

Reputation: 4441

If you have installed pyvisa by using below command:

pip install pyvisa

Then it gets installed in site packages of python 3.5 (or) site packages of that specific python version (whichever python that is serving at that point of time)

If you want that to be available for all python versions, install it to separate folder and add that path as value to PYTHONPATH (system variable). If there is no such variable, create one. Command to install it to separate folder is:

pip install pyvisa -t c:\external

(Or)

Re-install it using pip from specific python version

C:\Python34\python.exe -m pip install pyvisa

Upvotes: 2

Related Questions