简体   繁体   English

是否可以使用基于内置 python 的 ipython

[英]Is it possible to use ipython based on a builtin python

I am using paraview 4.3.1 in Centos 7. There is a built-in python named pvpython :我在 Centos 7 中使用 paraview 4.3.1。有一个名为pvpython的内置 python:

 Python 2.7.2 (default, Jan 15 2015, 09:36:49) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys;sys.path ['', '/tmp/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/site-packages/vtk', '/tmp/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/site-packages', '/tmp/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3', '/tmp/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/lib/python27.zip', '/tmp/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/lib/python2.7', '/tmp/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/lib/python2.7/plat-linux2', '/tmp/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/lib/python2.7/lib-tk', '/tmp/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/lib/python2.7/lib-old', '/tmp/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/lib/python2.7/lib-dynload', '/tmp/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/lib/python2.7/site-packages'] >>>

The problem is, original pvpython do not support many useful features such as code completion.问题是,原始的 pvpython 不支持许多有用的功能,例如代码完成。 And there is no setup_tools in the pvpython, so I cannot install new modules to the built-in python.而且 pvpython 中没有 setup_tools,所以我无法将新模块安装到内置 python 中。

Could anyone help me to install ipython on this built-in python?谁能帮我在这个内置的python上安装ipython?

See the install instructions for get-pip:请参阅 get-pip 的安装说明:
https://pip.pypa.io/en/latest/installing.html https://pip.pypa.io/en/latest/installing.html

However, you must use the pvpython instead of python when using the install instructions.但是,在使用安装说明时,您必须使用pvpython而不是python

Depending on how you install it, you may end up with more than one easy_install or pip on your path.根据您的安装方式,您的路径上可能会出现多个 easy_install 或 pip。 Just make sure you're using the one associated with pvpython - look at the script you're running to find out (it's just a shell script).只需确保您使用的是与pvpython相关联的那个 - 查看您正在运行的脚本以找出答案(它只是一个 shell 脚本)。

Once you've done that, installing ipython should be the same as installing it with any other version of python (assuming that pvpython doesn't break anything that ipython needs).完成此操作后,安装 ipython 应该与安装任何其他版本的 python 相同(假设pvpython不会破坏 ipython 需要的任何内容)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM