0

I am guessing that I am not the only one using non-system Python 2.7.2 for scientific computations on 6.2 PUIAS Linux (RedHat)). My Python 2.7.2 is installed in the sandbox and I call it with the command python2.7. When I need to execute scripts this is not the problem. However, I would like to use ipython instead default Python shell for interactive use. I added ipython using yum? When I start it, it defaults to system python. How do I force it to load python2.7?

Thanks a bunch!

4

2 回答 2

2

IPython is a Python package. When you have multiple Pythons, you must (generally, barring PYTHONPATH hacks) install a package for a given Python. yum would only install it for the System Python, so you must install it separately for your own Python. The solution is to simply pip install ipython with your own Python (install distribute/pip first, if you haven't).

于 2012-05-07T20:35:51.753 回答
0

I am going to answer my own question. For people who are using Python for scientific computing on RedHat clones (PUIAS for example) the easiest way to get all they need is to use rpm package manager and Enthought Python Distribution (EPD for short). EPD installs everything in a sandbox so system tools which are based on an obsolete version of Python are not massed up. However, paths have to be adjusted for system or even easier on the user base so that the using shell invokes non-system tools.

于 2012-12-13T17:50:51.347 回答