62

I just downloaded Anaconda 4.2.0 (with python 3.5.2) for Mac OS X. Whenever I try to update any packages etc, my ipython console presents the package dependencies and displays "Proceed ([y]/n)?" but does not take any inputs. E.g. I press enter, or y-enter etc. and nothing happens. Here's an example:

!conda create -n graphlab-env python=2.7 anaconda
Fetching package metadata .......
Solving package specifications: ..........

Package plan for installation in environment /Users/Abhijit/anaconda/envs/graphlab-env:

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    python-2.7.12              |                1         9.5 MB
    _license-1.1               |           py27_1          80 KB
    alabaster-0.7.9            |           py27_0          11 KB
    anaconda-clean-1.0.0       |           py27_0           3 KB
.
.
.
    nbpresent-3.0.2            |           py27_0         463 KB
    anaconda-4.2.0             |      np111py27_0           6 KB
    ------------------------------------------------------------
                                           Total:       143.9 MB

The following NEW packages will be INSTALLED:

    _license:           1.1-py27_1         
    _nb_ext_conf:       0.3.0-py27_0       
    alabaster:          0.7.9-py27_0       
    anaconda:           4.2.0-np111py27_0  
    anaconda-clean:     1.0.0-py27_0       
.
.
.
    yaml:               0.1.6-0            
    zlib:               1.2.8-3            

Proceed ([y]/n)? 

It won't respond after this step. When I enter 'Ctrl-C' it breaks out of this loop. I have tried Shift-Enter, Alt-Enter, Ctrl-Enter, Cmd-Enter etc but no luck. Tearing my hair out over this. Am I missing something?

Monica Heddneck
  • 2,973
  • 10
  • 55
  • 89
Aby
  • 621
  • 1
  • 5
  • 5
  • Did you check your internet connection, or may be the package you are trying to download is not available right now. – Md Sirajus Salayhin Oct 03 '16 at 09:48
  • Internet connection is fine. This happens with every update where it displays the 'Proceed?' part. For a single package update where the Proceed? part is not shown i.e. when it does not need any input, it works without any problems. I have updated and re-installed Anaconda multiple times and this has not solved the issue. – Aby Oct 03 '16 at 13:23
  • Just started running into this issue with a fresh install of Anaconda. Moreover, it *really* hangs on `conda install jupyter` even when passing `-y` – MattR Jun 24 '17 at 18:48

4 Answers4

66

You can launch shell commands with the ! operator in ipython, but you can't interact with them after the process has launched.

Therefore, you could:

  1. execute your conda command outside of your ipython session (IOW, a normal shell); or
  2. pass the --yes flag. e.g.:

!conda create -n graphlab-env python=2.7 anaconda -y

Oguzhan Bolukbas
  • 504
  • 6
  • 13
Paul H
  • 65,268
  • 20
  • 159
  • 136
41

Add --yes at the end of the command.

For example:

%conda install --yes seaborn
Wayne
  • 6,607
  • 8
  • 36
  • 93
aroma
  • 1,370
  • 1
  • 15
  • 30
8

Solution:

!conda update --update-all --yes

or shortly:

!conda update --all -y
Oguzhan Bolukbas
  • 504
  • 6
  • 13
Bia Ch
  • 91
  • 1
  • 2
7

Just Append -y to any command to say yes to all the yes/no questions. Most of the packages are configured in a way to work with this. For your:

!conda create -n graphlab-env python=2.7 anaconda -y
Oguzhan Bolukbas
  • 504
  • 6
  • 13
Karan Sharma
  • 475
  • 1
  • 5
  • 16