Discussion:
[conda] How to solve import cv2 conflict between system env and conda virtual env?
y***@gmail.com
2018-03-09 14:31:25 UTC
Permalink
I have installed opencv 3.4.1 correctly on my system enviroment.

But after I create a conda virtual environment using a yml file inlcues
opencv3.2.0, it leads some problems here:

*Under the conda virtual env,* I have to always first

ldd PATH_TO_VIRTUAL_ENV_SITE_PACKAGES/cv2.so

such that import cv2 is correctly using the 3.2.0 version of opencv,without
this step, 3.4.1 will be used.

*Under the conda base environment* , if the PATH in ~/.bashrc is indicate
to anaconda3, then every time source deactivate myenv, I will under conda
base enviroment by default. import cv2 will use opencv 3.4.1 version.

*Under the system enviroment*, i.e first comment the PATH to anaconda3,
then import cv2 will lead to segmentation fault.

How to solve this problem? Thank you.
--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/conda/fd0d4c04-6192-4f8a-9a86-116198b82294%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
y***@gmail.com
2018-03-09 16:20:29 UTC
Permalink
Sorry, not ldd, but* cd myenv/lib/python3.5/site_package*s/
Post by y***@gmail.com
I have installed opencv 3.4.1 correctly on my system enviroment.
But after I create a conda virtual environment using a yml file inlcues
*Under the conda virtual env,* I have to always first
ldd PATH_TO_VIRTUAL_ENV_SITE_PACKAGES/cv2.so
such that import cv2 is correctly using the 3.2.0 version of
opencv,without this step, 3.4.1 will be used.
*Under the conda base environment* , if the PATH in ~/.bashrc is indicate
to anaconda3, then every time source deactivate myenv, I will under conda
base enviroment by default. import cv2 will use opencv 3.4.1 version.
*Under the system enviroment*, i.e first comment the PATH to anaconda3,
then import cv2 will lead to segmentation fault.
How to solve this problem? Thank you.
--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/conda/f0cf83cd-03cc-4407-a77d-927a31067fc0%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
Loading...