我正在尝试在Windows 8.1中安装并运行OpenCV 3.0.0 for python 3.4.2.
C:\Python34\Lib\site-packages.最后我去了Python 3.4.2的IDLE并写了(这是在将精美复制到Python目录之前发生的):
import cv2
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import cv2
ImportError: No module named 'cv2'
Run Code Online (Sandbox Code Playgroud)
这是在我将文件复制到Python目录后发生的:
import cv2
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
import cv2
ImportError: DLL load failed: The specified module could not be found. …Run Code Online (Sandbox Code Playgroud) EDITED
你好程序员社区,
我在Python 3.4中处理pyserial有一些问题我首先没有串口,所以我用"Eltima Software的虚拟串口驱动7.2"成对创建虚拟串口,这意味着我可以尝试从这些端口发送和接收数据,在我的情况下我只创建连接到COM2的COM1,然后我安装了HW组的Hercules SETUP实用程序来监控这些串口,
所以理论上如果我在PYTHON中发送(写入)数据我可以在HERCULES中看到它,因为这个链接显示https://www.youtube.com/watch?v=DItyttmpRtY
我试图创建自己的代码
def mInitizalise():
set_ser = serial.Serial(port="COM1", baudrate=9600,
parity = serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize = serial.EIGHTBITS,
timeout=1)
set_ser.close()
set_ser.open()
if set_ser.isOpen():
print ('Open: ' + set_ser.portstr)
temp = input('Type what you want to send, hit enter:\r\n')
set_ser.write(temp)
set_ser.close()
Run Code Online (Sandbox Code Playgroud)
买有错误
>>>
>>> Open: COM1
Type what you want to send, hit enter:
hello
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python34\lib\idlelib\run.py", line 121, in main
seq, request = rpc.request_queue.get(block=True, timeout=0.05)
File "C:\Python34\lib\queue.py", …Run Code Online (Sandbox Code Playgroud)