Skip to content

Commit 65e3288

Browse files
committed
CondaInstalled: Separate path for conda on windows
1 parent c356dc9 commit 65e3288

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Orange/canvas/application/addons.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,10 +861,21 @@ def manual_uninstall(self, dist):
861861

862862
class 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+
return conda
868879

869880
def install(self, pkg):
870881
cmd = ["conda", "install", "--yes", pkg.name]

0 commit comments

Comments
 (0)