Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install ipython under Linux

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces "how to install ipython under Linux" related knowledge, editor through the actual case to show you the operation process, the method of operation is simple and fast, practical, I hope that this "how to install ipython under Linux" article can help you solve the problem.

Ipython is an interactive shell of python, which is much easier to use than the default python shell. It supports automatic completion of variables, automatic indentation, support for bash shell commands, and many useful functions and functions built in. First, install ipython through the compressed package

1. Download the IPython installation package

$wget https://files.pythonhosted.org/packages/82/0a/146b0f0f1ddf13ab8682aed5c5a42250cddf1082e193ec95b50b03b9f791/ipython-7.3.0.tar.gz

2. Install IPython

[root@localhost ~] # tar xf ipython-7.3.0.tar.gz [root@localhost ~] # cd ipython-7.3.0 [root@localhost ipython-7.3.0] # pwd/root/ipython-7.3.0 [root@localhost ipython-7.3.0] # python3 setup.py install

# if python3 is installed, # Linux system installation Python3 can be found in: http://www.cnblogs.com/chengd/p/7078498.html

3. Install all missing modules of ipython through pip until ipython runs successfully

[root@localhost ipython] # ipythonTraceback (most recent call last): File "/ usr/local/bin/ipython", line 4, in from IPython import start_ipython File "/ usr/local/lib/python3.7/site-packages/IPython/__init__.py", line 54, in from .core.application import Application File "/ usr/local/lib/python3.7/site-packages/IPython/core/application.py", line 23, in from traitlets.config.application import Application, catch_config_errorModuleNotFoundError: No module named 'traitlets'

# running ipython indicates that the 'traitlets' module is missing; # installation prompts install the missing module step by step through pip

[root@localhost ipython] # pip install 'traitlets'Collecting traitlets Downloading https://files.pythonhosted.org/packages/93/d6/abcb22de61d78e2fc3959c964628a5771e47e7cc60d53e9342e21ed6cc9a/traitlets-4.3.2-py2.py3-none-any.whl (74kB) 100% | ██ | 81kB 100kB/sRequirement already satisfied (use-- upgrade to upgrade): enum34 Python_version = "2.7" in / usr/lib/python2.7/site-packages (from traitlets) Requirement already satisfied (use-- upgrade to upgrade): six in / usr/lib/python2.7/site-packages (from traitlets) Collecting ipython-genutils (from traitlets) Downloading https://files.pythonhosted.org/packages/fa/bc/9bd3b5c2b4774d5f33b2d544f1460be9df7df2fe42f352135381c347c69a/ipython_genutils-0.2.0-py2.py3-none-any.whlRequirement already satisfied (use-- upgrade to upgrade): decorator in / usr/lib/ Python2.7/site-packages (from traitlets) Installing collected packages: ipython-genutils TraitletsSuccessfully installed ipython-genutils-0.2.0 traitlets-4.3.2You are using pip version 8.1.2, however version 19.0.3 is available.You should consider upgrading via the 'pip install-upgrade pip' command.

Upgrade pip

[root@localhost ipython] # pip install-- upgrade pipCollecting pip Downloading https://files.pythonhosted.org/packages/d8/f3/413bab4ff08e1fc4828dfc59996d721917df8e8583ea85385d51125dceff/pip-19.0.3-py2.py3-none-any.whl (1.4MB) 68% | █▉ | 921kB 8.5kB/s eta 0:00:51 100% | █ █ | 1.4MB 73kB/sInstalling collected packages: pip Found existing installation: pip 8.1.2 Uninstalling pip-8.1.2: Successfully uninstalled pip-8.1.2Successfully installed pip-19.0.3 II. Install ipython directly through pip

Pip installation address: https://www.linuxidc.com/Linux/2019-02/157062.htm

[root@localhost pip-9.0.1] # pip install ipython [root@localhost pip-9.0.1] # ipythonipython ipython3 [root@localhost pip-9.0.1] # ipython3/usr/local/lib/python3.6/site-packages/IPython/core/history.py:226: UserWarning: IPython History requires SQLite, your history will not be saved warn ("IPython History requires SQLite, your history will not be saved") Python 3.6.1 (default, Jun 26 2017, 09:16:04) Type 'copyright' 'credits' or 'license' for more informationIPython 6.1.0-An enhanced Interactive Python. Type'?' For help.In [1]: # ipython successfully installed so much about "how to install ipython under Linux". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report