6

I'm using this method to launch Anaconda Prompt 32-bit version "open a regular command prompt, figure out where miniconda got installed, cd to the miniconda\Scripts directory and type "activate". Rsignell I'd like to be able to activate this from Cortana/Start Menu, because I'm using both 32 and 64-bit versions.

Following this workaround I added a shortcut:

cmd /c start "C:\path\to\Miniconda3\Scripts\activate"

with the name "Anaconda Prompt (32)". This icon has the right-click contextual Pin to Start option and Cortana can find this 32-bit shortcut.

However, the console that's launched is not an active conda environment: C:\WINDOWS\system32 > and should show up as (conda) C:\WINDOWS\system32 >. The same line used in a console will activate conda. Any suggestions to fix this solution?

1 Answer 1

8

The console that's launched is not an active conda environment

You are using the start command incorrectly and it is not executing C:\path\to\Miniconda3\Scripts\activate.

The first parameter for start is the title bar text.

Try using:

cmd /c start "" "C:\path\to\Miniconda3\Scripts\activate"

Usage:

Syntax
      START "title" [/D path] [options] "command" [parameters]

Key:
   title       Text for the CMD window title bar (required.)
   path        Starting directory.
   command     The command, batch file or executable program to run.
   parameters  The parameters passed to the command.

...

Always include a TITLE this can be a simple string like "My Script" or just a pair of empty quotes "" According to the Microsoft documentation, the title is optional, but depending on the other options chosen you can have problems if it is omitted.

Source Start - Start a program - Windows CMD - SS64.com


Further Reading

4
  • 2
    Wow! Great answer. That fixed it, but why does it work in the console?
    – xtian
    Jul 1, 2018 at 16:29
  • @xtian Because from the console the sequence of commands you type don't have anything to do with start.
    – DavidPostill
    Jul 1, 2018 at 18:07
  • 1
    @DavidPostill Do tell - why does cmd /c start "C:\some\path" not have anything to do with start?
    – user253751
    Jul 2, 2018 at 1:43
  • @user20574 Ah. I misunderstood. I don't know why it works in the console, other than what it says in the last part of the answer.
    – DavidPostill
    Jul 2, 2018 at 4:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .