0

I am using paraview 4.3.1 in Centos 7. There is a built-in python named pvpython:

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. And there is no setup_tools in the pvpython, so I cannot install new modules to the built-in python.

Could anyone help me to install ipython on this built-in python?

Ali_Sh
  • 2,667
  • 3
  • 43
  • 66
CatDog
  • 415
  • 6
  • 12
  • Install pip see instructions here: https://pip.pypa.io/en/latest/installing.html It will install setuptools if needed and then you can `pip install ipython` – AChampion Feb 22 '15 at 04:59
  • I just tried this tactic: [link](http://stackoverflow.com/questions/9386048/ipython-reads-wrong-python-version) But it failed, it seems that I cannot pass arguments to pvpython. – CatDog Feb 27 '15 at 01:02

1 Answers1

2

See the install instructions for get-pip:
https://pip.pypa.io/en/latest/installing.html

However, you must use the pvpython instead of python when using the install instructions.

Depending on how you install it, you may end up with more than one easy_install or pip on your path. 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).

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).

Ali_Sh
  • 2,667
  • 3
  • 43
  • 66
CodeViking
  • 236
  • 3
  • 6
  • AFAIK, this is not the preferred way to do that anymore. You can use `getpip.py` to bootstrap both `setuptools` and `pip` in one go. See the link provided by @achampion – cel Feb 22 '15 at 12:03
  • Thanks for the heads up @cel. Changed answer to use get-pip instead of ez_install. – CodeViking Feb 22 '15 at 23:33
  • I tried get-pip.py like this: ' >>> execfile("get-pip.py") ' But I get an error 'No module named 'pip._vendor.requests'' – CatDog Feb 27 '15 at 00:34