gpt4 book ai didi

python - 未找到 PyVisa 二进制库

转载 作者:太空宇宙 更新时间:2023-11-03 20:36:14 32 4
gpt4 key购买 nike

二进制库:未找到错误。

我在 Windows 10 上从 Git Bash 运行并使用 pip 安装软件包。

我从他们的网站安装了 Ni-VISA 以及 pyVISA 和 pyVISA-py 软件包。
我的 Visa32.dll 和 Visa64.dll 位于 C:\Windows\System32 中。

我尝试安装了pyvisa-py的开发版本。不工作。我在 Windows“系统变量”下的路径与另一台正常工作的计算机上的路径相同。

预先感谢您的帮助。我很不好意思地说我在这上面花了多少时间。

Machine Details:
Platform ID: Windows-10-10.0.18362
Processor: Intel64 Family 6 Model 142 Stepping 9, GenuineIntel

Python:
Implementation: CPython
Executable: C:\Python27\python.exe
Version: 2.7.15
Compiler: MSC v.1500 32 bit (Intel)
Bits: 32bit
Build: Apr 30 2018 16:22:17 (#v2.7.15:ca079a3ea3)
Unicode: UCS2

PyVISA Version: 1.9.1

Backends:
ni:
Version: 1.9.1 (bundled with PyVISA)
Binary library: Not found
py:
Version: 0.3.1
ASRL INSTR: Available via PySerial (3.4)
TCPIP INSTR: Available
USB RAW:
Please install PyUSB to use this resource type.
No module named usb
USB INSTR:
Please install PyUSB to use this resource type.
No module named usb
GPIB INSTR:
Please install linux-gpib to use this resource type.
No module named gpib
TCPIP SOCKET: Available

在终端中使用 Python 的路径和“import sys;print(sys.path)”

['', 'C:\\WINDOWS\\SYSTEM32\\python27.zip', 'C:\\Python27\\DLLs', 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\\lib-tk', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages', 'C:\\Python27\\lib\\site-packages\\win32', 'C:\\Python27\\lib\\site-packages\\win32\\lib', 'C:\\Python27\\lib\\site-packages\\Pythonwin']

我希望有

Backends:
ni:
Version: 1.9.1 (bundled with PyVISA)
#1: C:\Windows\system32\visa32.dll:
found by: auto
bitness:32
Vendor: Keysight Technologies
Impl. Version: 1364384898
Spec. Version: 5243136

最佳答案

终于明白了。

在目录 C:\Users[用户名] 中,创建或修改 .pyvisarc 文件(这是唯一的文件扩展名)。然后添加以下文本,指向您的 visa32.dll :

[Paths]

VISA library: C:/Windows/System32/visa32.dll

语法很重要。另外,如果您只是为了安全起见,请重新启动终端,然后 python -m Visa info 终端命令应显示预期的 NI 后端。

Here's link to the documentation for other systems

关于python - 未找到 PyVisa 二进制库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57152698/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com