
I set up a virtualenvs for python 3.1 with opencv3. But when I am in the virtual env and execute python import cv2. Apparently you have to create a link of the 3.1.so file to cv2.so . I get an error relating to cv2 /opt/ros/kinetic . I do not know why it is looking here? If I uninstall ros then it works fine, no error. Any thoughts. Update: if I remove the .bashrc source kinetic setup then it also works fine in the virt. What ever the setup is doing is causing a conflict even when the ros is set up outside the virtual env.
Originally posted by rnunziata on ROS Answers with karma: 713 on 2017-05-03
Post score: 1
Original comments
Comment by lakehanne on 2017-05-03:
Try this: reinstall opencv3 while in the virtualenvs and specify the target install path to your virtualenvs opencv3 desired directory using CMAKE_INSTALL_PPREFIX=/your/desired/venv/directory
Comment by rnunziata on 2017-05-04:
Thanks....I will keep this i mind for future reference. Right now I can use both enviroments by just commenting on/off the source lines in the .bashrc file.
Comment by Daniel Tobon on 2017-08-12:
what line in .bashrc file?
Comment by rnunziata on 2017-08-12:
if false; then
workon cvp3
export OPENCV_VERSION=3
else
source /opt/ros/kinetic/setup.bash
source ~/catkin_ws/devel/setup.bash
Comment by waschbaer00 on 2018-03-07:
I am quite curious on this question, could you share more you know, give more instructions.