1. 程式人生 > >Python3+ros 呼叫opencv解決辦法:

Python3+ros 呼叫opencv解決辦法:

程式碼前面修改為

import sys
ros_path = '/opt/ros/kinetic/lib/python2.7/dist-packages'

if ros_path in sys.path:

    sys.path.remove(ros_path)

import cv2

sys.path.append('/opt/ros/kinetic/lib/python2.7/dist-packages')

(TypeError: remove() takes exactly one argument (0 given))
意思是,()裡要一個引數,但是給出0個