Install IPython in Conda Environment

Q

How to install IPython in a Conda environment?

✍: FYIcenter.com

A

If you want to install IPython in a specific Conda environment, you can follow this tutorial.

1. Activate the Conda environment where you want to install IPython.

fyicenter$ conda activate faq

(faq) fyicenter$ python --version 
  Python 3.9.6

2. Install IPython in the activated Conda environment.

(faq) fyicenter$ conda install ipython
  ...

3. Verify IPython installation.

(faq) fyicenter$ which ipython
  ~/anaconda3/envs/faq/bin/ipython

(faq) fyicenter$ ipython --version
  7.26.0

4. Try "ipython" shell.

(faq) fyicenter$ ipython

Python 3.9.6
IPython 7.26.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: print("Hello world!")
Hello world!

In [2]: exit
(faq) fyicenter$

By the way, IPython is included in the Jupyter package. If you have Jupyter installed, IPython is ready to use.

If your have connection issues with the Conda default repository, you can add a local one with the "conda config" command.

(faq) fyicenter$ conda config --add channels \
  https://mirrors.usxx.edu/anaconda/pkgs/main

(faq) fyicenter$ conda config --show channels
channels:
  - https://mirrors.usxx.edu/anaconda/pkgs/main
  - defaults

 

Install IPython Kernel in Conda Environment

What Is IPython

Installing IPython as Jupyter Kernel

⇑⇑ Jupyter Tutorials

2021-11-25, 5359🔥, 0💬