Yet another, How can I launch Miniconda and activate an environment at the same time? or Why doesn't this other post's answer work?
I found this solution on SO: How to change default Anaconda python environment.
The suggested solution in the above link only partially works. I'm not very familiar with Windows to know if the problem is with Anaconda/Miniconda or Windows.
The linked solution has three 'parts':
1. C:\Windows\System32\cmd.exe "/K" \
2. C:\Users\MyHome\Miniconda3_64-4.5.4\Scripts\activate.bat \
3. C:\Users\MyHome\Miniconda3_64-4.5.4\envs\myenv
Part 1 and 2 do work to launch the Miniconda CMD console.
Part 3 does work to display the environment name as if it were activated the normal way conda activate myenv
.
Testing this newly spawned CMD console showing (myenv)
with conda
command results in the following error:
(myenv) C:\Users\MyHome>conda
'conda' is not recognized as an internal or external command, operable program or batch file.
Any idea why the third clause works to select the environment, but not to permit me to use the packages in it?
UPDATE, 2019-09-05
I found the Windows created a shortcut in Cortana by using the contextual menu item Open File Location
. I found the shortcut file here,
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Anaconda3 (32-bit)\Anaconda Prompt
I duplicated this shortcut into Anaconda3 (64-bit)
shortcut folder and edited the Target line:
C:\Windows\System32\cmd.exe "/K" C:\Users\MyHome\Miniconda3_64-4.5.4\Scripts\activate.bat C:\Users\MyHome\Miniconda3_64-4.5.4\envs\myenv
I updated the Miniconda 32-bit paths, C:\Users\MyHome\Miniconda3_32\...
to the 64-bit paths. Now Cortana overs both the 32-bit env shortcut, and my new 64-bit shortcut.
However, I'm still experiencing the same problem--
(myenv) C:\Windows\system32>conda lsit
'conda' is not recognized as an internal or external command,
operable program or batch file.
Something odd here though. The Start in
path is not correct and not the same as the original shortcut
(qb) C:\Users\myhome>conda list
...
something 4.3.1 h33f27b4_3 anaconda
lastthing 1.2.11 vc14h902601c_1 [vc14] anaconda
(qb) C:\Users\myhome>
I contend that Windows 10's Cortana, without any intervention from me, created the shortcut that will launch Anaconda 32-bit into the only environment! This sounds koo-koo, but honest--this Cortana shortcut is not the same file as the one I created.