[SciPy-Dev] ImportError: No module named ipapp

Johann Cohen-Tanugi cohen@lpta.in2p3...
Sat Mar 13 14:55:52 CST 2010


Hi Brian, thanks for your help, see below my still being confused :

<quote author="Brian Granger-3">
Hi,

 > I have an identical problem : I have a trunk build of ipython, that I
 > installed with --user, and then today I wanted to have a look at the 
bundle
 > EPD distribution. I thought that the whole point was that I could get a
 > completely "waterproof" distribution with EPD, irrespective of any other
 > development version of say ipython on my system.
 >
 > EPD, is like any other Python installation in terms of how it 
resolves and finds
 > Python packages.  When you install EPD, it sets your PATH variables 
to point
 > to its python, ipython, etc scripts.  BUT, Python 2.6 still uses the
 > --user location
 > to find packages.  Thus, you have the following problem:
 >
 > * /home/cohen/sources/python/epd-6.1-1-rh5-x86/bin/ipython is first 
on your
 > path, so when you type ipython at the command line,  that script starts.
 >
 > * But when that script tries to "from IPython.ipapi import 
launch_new_instance"
 > Python goes and finds the IPython package in the --user location, 
which is the
 > wrong version of IPython (trunk doesn't have launch_new_instance).

-> Ok that is where I am being confused. The trunk ipython with the 
--user has been built/installed with the native python, while the EPD 
ipython is supposed to call the EPD python shipped in. I was expecting 
that things would be messed up *if* I had a PYTHONPATH env var 
installed, because this would be read by either instance. Thus I made 
sure to unset PYTHONPATH..... but it seems that something else keeps 
been share....
Isn't there any way to keep these two python instances completely 
separate within one system?

thanks for the clarification, this is a bit disappointing to me :(
Johann

 > So you must:
 >
 > * Install trunk IPython into EPD so that its "ipython" script points
 > to the trunk version.
 > * Set your PATH differently so that the trunk "ipython" script is
 > found before the EPD
 > version.
 > * Uninstall the trunk version of IPython.
 >
 > Hope this helps,
 >
 > Cheers,
 >
 > Brian

 > But I get:
 > [cohen@jarrett ~]$ 
/home/cohen/sources/python/epd-6.1-1-rh5-x86/bin/ipython
 > Traceback (most recent call last):
 >   File "/home/cohen/sources/python/epd-6.1-1-rh5-x86/bin/ipython", 
line 7,
 > in <module>
 >     from IPython.ipapi import launch_new_instance
 > ImportError: No module named ipapi
 >
 > if I rename .local as local, then the EPD version loads ok.... Isn't 
there a
 > way to keep both functioning?
 >
 > thanks,
 > Johann
 >
 > On 02/10/2010 05:34 AM, Brian Granger wrote:
 >
 > Can you try removing all traces of ipython (both from bin dirs and
 > site-packages) and reinstall.  It looks like you have multiple 
versions on
 > your PATH/PYTHONPATH that are conflicting.
 >
 > Cheers,
 >
 > Brian
 >
 >
 >
 > On Tue, Feb 9, 2010 at 11:22 AM, Nils Wagner 
<nwagner@iam.uni-stuttgart.de>
 > wrote:
 >>
 >> Hi all,
 >>
 >> I have installed ipython from scratch
 >>
 >> bzr branch lp:ipython
 >> cd ipython
 >> python setup.py install --prefix=$HOME/local
 >>
 >> If I start ipython
 >>
 >> ipython
 >> Traceback (most recent call last):
 >>   File "/home/nwagner/local/bin/ipython", line 4, in
 >> <module>
 >>     from IPython.core.ipapp import launch_new_instance
 >> ImportError: No module named ipapp
 >>
 >> Any idea ?
 >>
 >>            Nils
 >> _______________________________________________
 >> IPython-dev mailing list
 >> IPython-dev@scipy.org
 >> http://mail.scipy.org/mailman/listinfo/ipython-dev
 >
 >
 > --
 > This message has been scanned for viruses and
 > dangerous content by MailScanner, and is
 > believed to be clean.
 >
 > _______________________________________________
 > IPython-dev mailing list
 > IPython-dev@scipy.org
 > http://mail.scipy.org/mailman/listinfo/ipython-dev
 >
 >
 > _______________________________________________
 > IPython-dev mailing list
 > IPython-dev@scipy.org
 > http://mail.scipy.org/mailman/listinfo/ipython-dev
 >
 >



-- 
Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu
ellisonbg@gmail.com
_______________________________________________
IPython-dev mailing list
IPython-dev@scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-dev

</quote>



More information about the SciPy-Dev mailing list