How to solve the conda virtual env and system env conflict on import cv2?

Clash Royale CLAN TAG#URR8PPP up vote
0
down vote
favorite
I have installed opencv 3.4.1 correctly on my system enviroment.
But after I create a conda virtual environment using opencv3.2.0, it leads some problems here:
Under the conda virtual env, I have to always first
cd myenv/lib/python3.5/site_packages/
such that import cv2 is correctly using the 3.2.0 version of opencv.
Under the conda base enviroment import cv2 using 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.
environment-variables bashrc paths conda
add a comment |Â
up vote
0
down vote
favorite
I have installed opencv 3.4.1 correctly on my system enviroment.
But after I create a conda virtual environment using opencv3.2.0, it leads some problems here:
Under the conda virtual env, I have to always first
cd myenv/lib/python3.5/site_packages/
such that import cv2 is correctly using the 3.2.0 version of opencv.
Under the conda base enviroment import cv2 using 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.
environment-variables bashrc paths conda
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have installed opencv 3.4.1 correctly on my system enviroment.
But after I create a conda virtual environment using opencv3.2.0, it leads some problems here:
Under the conda virtual env, I have to always first
cd myenv/lib/python3.5/site_packages/
such that import cv2 is correctly using the 3.2.0 version of opencv.
Under the conda base enviroment import cv2 using 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.
environment-variables bashrc paths conda
I have installed opencv 3.4.1 correctly on my system enviroment.
But after I create a conda virtual environment using opencv3.2.0, it leads some problems here:
Under the conda virtual env, I have to always first
cd myenv/lib/python3.5/site_packages/
such that import cv2 is correctly using the 3.2.0 version of opencv.
Under the conda base enviroment import cv2 using 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.
environment-variables bashrc paths conda
environment-variables bashrc paths conda
edited Mar 9 at 16:22
asked Mar 9 at 14:12
waschbaerYOYO
12
12
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
You can set the PATH in .profile like you do in .bashrc too, so apps will try to find lib installed in conda envs as well.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
You can set the PATH in .profile like you do in .bashrc too, so apps will try to find lib installed in conda envs as well.
add a comment |Â
up vote
0
down vote
You can set the PATH in .profile like you do in .bashrc too, so apps will try to find lib installed in conda envs as well.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
You can set the PATH in .profile like you do in .bashrc too, so apps will try to find lib installed in conda envs as well.
You can set the PATH in .profile like you do in .bashrc too, so apps will try to find lib installed in conda envs as well.
answered Apr 18 at 20:09
user12164
116119
116119
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1013412%2fhow-to-solve-the-conda-virtual-env-and-system-env-conflict-on-import-cv2%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password