File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Orange/canvas/application Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -861,10 +861,24 @@ def manual_uninstall(self, dist):
861861
862862class CondaInstaller :
863863 def __init__ (self ):
864+ self .conda = self ._find_conda ()
865+
866+ def _find_conda (self ):
864867 executable = sys .executable
865868 bin = os .path .dirname (executable )
869+
870+ # posix
866871 conda = os .path .join (bin , "conda" )
867- self .conda = conda if os .path .exists (conda ) else None
872+ if os .path .exists (conda ):
873+ return conda
874+
875+ # windows
876+ conda = os .path .join (bin , "Scripts" , "conda.bat" )
877+ if os .path .exists (conda ):
878+ # "activate" conda environment orange is running in
879+ os .environ ["CONDA_PREFIX" ] = bin
880+ os .environ ["CONDA_DEFAULT_ENV" ] = bin
881+ return conda
868882
869883 def install (self , pkg ):
870884 cmd = ["conda" , "install" , "--yes" , pkg .name ]
You can’t perform that action at this time.
0 commit comments