ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can find the correct version through your CMakeLists.txt file in yoru ROS package:

find_package(OpenCV 3.4.3 REQUIRED)

Look here for documentation of find_package.

Edit: Sorry, I've overlooked somehow you're using python instead of c++. I'm not familiar with python and ROS that much, but here might be answer for you. It seems like you need to remove /opt/ros/indigo/lib/python2.7/dist-packages from your PYTHONPATH environment variable and replace it with the path to your python3 package (this should be something similar to /opt/ros/indigo/lib/python3.5/dist-packages depending on where your python is installed).

You can do it by adding these lines in the end of your .bashrc file at home directory:

export PYTHONPATH=$PYTHONPATH:/opt/ros/indigo/lib/python3.5/dist-packages
export PYTHONPATH=$(echo $PYTHONPATH | sed -e 's/opt/ros/indigo/lib/python2.7/dist-packages//g')

The first line adds your python3 path to your PYTHONPATH system variable (again, this is just example of the path, yours path to the python3 can be different). The second line removes your old python2 path.

c++ version: You can find the correct version through your CMakeLists.txt file in yoru ROS package:

find_package(OpenCV 3.4.3 REQUIRED)

Look here for documentation of find_package.

Edit: Edit: Sorry, I've overlooked somehow you're using python instead of c++. I'm not familiar with python and ROS that much, but here might be answer for you. It seems like you need to remove /opt/ros/indigo/lib/python2.7/dist-packages from your PYTHONPATH environment variable and replace it with the path to your python3 package (this should be something similar to /opt/ros/indigo/lib/python3.5/dist-packages depending on where your python is installed).

You can do it by adding these lines in the end of your .bashrc file at home directory:

export PYTHONPATH=$PYTHONPATH:/opt/ros/indigo/lib/python3.5/dist-packages
export PYTHONPATH=$(echo $PYTHONPATH | sed -e 's/opt/ros/indigo/lib/python2.7/dist-packages//g')

The first line adds your python3 path to your PYTHONPATH system variable (again, this is just example of the path, yours path to the python3 can be different). The second line removes your old python2 path.

c++ version: You can find the correct version through your CMakeLists.txt file in yoru ROS package:

find_package(OpenCV 3.4.3 REQUIRED)

Look here for documentation of find_package.

Edit: Sorry, I've overlooked somehow you're using python instead of c++. I'm not familiar with python and in ROS that much, but here might be answer for you. It seems like you need to remove /opt/ros/indigo/lib/python2.7/dist-packages from your PYTHONPATH environment variable and replace it with the path to your python3 package (this should be something similar to /opt/ros/indigo/lib/python3.5/dist-packages depending on where your python is installed).

You can do it by adding these lines in the end of your .bashrc file at home directory:

export PYTHONPATH=$PYTHONPATH:/opt/ros/indigo/lib/python3.5/dist-packages
export PYTHONPATH=$(echo $PYTHONPATH | sed -e 's/opt/ros/indigo/lib/python2.7/dist-packages//g')

The first line adds your python3 path to your PYTHONPATH system variable (again, this is just example of the path, yours path to the python3 can be different). The second line removes your old python2 path.

c++ version: You can find the correct version through your CMakeLists.txt file in yoru ROS package:

find_package(OpenCV 3.4.3 REQUIRED)

Look here for documentation of find_package.

Edit: Sorry, I've overlooked somehow you're using python instead of c++. I'm not familiar with python in ROS that much, but here might be answer for you. It seems like you need to remove /opt/ros/indigo/lib/python2.7/dist-packages from your PYTHONPATH environment variable and replace it with the path to your python3 package (this should be something similar to /opt/ros/indigo/lib/python3.5/dist-packages depending on where your python is installed).

You can do it by adding these lines in the end of your .bashrc file at home directory:

export PYTHONPATH=$PYTHONPATH:/opt/ros/indigo/lib/python3.5/dist-packages
export PYTHONPATH=$(echo $PYTHONPATH | sed -e 's/opt/ros/indigo/lib/python2.7/dist-packages//g')
''s/\/opt\/ros\/indigo\/lib\/python2.7\/dist-packages//g'')

The first line adds your python3 path to your PYTHONPATH system variable (again, this is just example of the path, yours path to the python3 can be different). The second line removes your old python2 path.

c++ version: You can find the correct version through your CMakeLists.txt file in yoru ROS package:

find_package(OpenCV 3.4.3 REQUIRED)

Look here for documentation of find_package.

Edit: Sorry, I've overlooked somehow you're using python instead of c++. I'm not familiar with python in ROS that much, but here might be answer for you. It seems like you need to remove /opt/ros/indigo/lib/python2.7/dist-packages from your PYTHONPATH environment variable and replace it with the path to your python3 package (this should be something similar to /opt/ros/indigo/lib/python3.5/dist-packages depending on where your python is installed).

You can do it by adding these lines in the end of your .bashrc file at home directory:

export PYTHONPATH=$PYTHONPATH:/opt/ros/indigo/lib/python3.5/dist-packages
export PYTHONPATH=$(echo $PYTHONPATH | sed -e ''s/\/opt\/ros\/indigo\/lib\/python2.7\/dist-packages//g'')
's/\/opt\/ros\/indigo\/lib\/python2.7\/dist-packages//g'')

The first line adds your python3 path to your PYTHONPATH system variable (again, this is just example of the path, yours path to the python3 can be different). The second line removes your old python2 path.

c++ version: You can find the correct version through your CMakeLists.txt file in yoru ROS package:

find_package(OpenCV 3.4.3 REQUIRED)

Look here for documentation of find_package.

Edit: Sorry, I've overlooked somehow you're using python instead of c++. I'm not familiar with python in ROS that much, but here might be answer for you. It seems like you need to remove /opt/ros/indigo/lib/python2.7/dist-packages from your PYTHONPATH environment variable and replace it with the path to your python3 package (this should be something similar to /opt/ros/indigo/lib/python3.5/dist-packages depending on where your python is installed).

You can do it by adding these lines in the end of your .bashrc file at home directory:

export PYTHONPATH=$PYTHONPATH:/opt/ros/indigo/lib/python3.5/dist-packages
export PYTHONPATH=$(echo $PYTHONPATH | sed -e 's/\/opt\/ros\/indigo\/lib\/python2.7\/dist-packages//g'')
's/\/opt\/ros\/indigo\/lib\/python2.7\/dist-packages//g')

The first line adds your python3 path to your PYTHONPATH system variable (again, this is just example of the path, yours path to the python3 can be different). The second line removes your old python2 path.

c++ version: You can find the correct version through your CMakeLists.txt file in yoru ROS package:

find_package(OpenCV 3.4.3 REQUIRED)

Look here for documentation of find_package.