Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Proceed (y/n)? in Python

I am trying to uninstall my current version of keras and install an older version using:

!pip uninstall keras
!pip install keras==2.1.2

The return I get is :

Uninstalling Keras-2.1.2:
  Would remove:
    /home/nbuser/anaconda3_501/lib/python3.6/site-packages/Keras-2.1.2.dist-info/*
    /home/nbuser/anaconda3_501/lib/python3.6/site-packages/keras/*
Proceed (y/n)? 

Could I please get help with how to select yes?

like image 518
Khan11 Avatar asked Jun 12 '26 03:06

Khan11


2 Answers

You can't interact with shell commands after you launch them so you have to either pass the --yes flag:

!pip install keras==2.1.2 --yes

or you can execute your command outside of ipython (jupyter).

like image 161
SamrajM Avatar answered Jun 14 '26 17:06

SamrajM


On cent os I often must use

yes | bash cmd

https://www.computerhope.com/unix/yes.htm


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!