Skip to content

Instantly share code, notes, and snippets.

@scw
Last active September 20, 2019 17:01
Show Gist options
  • Save scw/ae8e6a541e059cabeace432d0b5ab982 to your computer and use it in GitHub Desktop.
Save scw/ae8e6a541e059cabeace432d0b5ab982 to your computer and use it in GitHub Desktop.
Patch Anaconda Navigator to use conda executable instead of root python wrapper to conda
# NOTE: activate the environment containing Pro + Anaconda Navigator, and copy the
# navigator-pro.patch to your working directory.
conda install -y m2-patch
patch --binary %CONDA_PREFIX%\Lib\site-packages\anaconda_navigator\api\conda_api.py navigator-pro.patch
--- Lib/site-packages/anaconda_navigator/api/conda_api.py.orig 2018-09-12 02:16:59.656798200 -0400
+++ Lib/site-packages/anaconda_navigator/api/conda_api.py 2018-09-12 02:18:34.688376200 -0400
@@ -410,12 +410,12 @@
"""
if abspath:
if sys.platform == 'win32':
- python = join(self.ROOT_PREFIX, 'python.exe')
- conda = join(self.ROOT_PREFIX, 'Scripts', 'conda-script.py')
+ conda = join(self.ROOT_PREFIX, 'Scripts', 'conda.exe')
+ cmd_list = [conda]
else:
python = join(self.ROOT_PREFIX, 'bin/python')
conda = join(self.ROOT_PREFIX, 'bin/conda')
- cmd_list = [python, conda]
+ cmd_list = [python, conda]
else:
# Just use whatever conda is on the path
cmd_list = ['conda']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment