Re: [Tutor] Ipython Queries

2015-03-15 Thread Santosh Kumar
Thank you All. I forgot to update you guys , i use ubuntu 14.10 .
I believe/was under assumption that we cannot used ipython both for python
2.x and python 3.x.
So ipython is for python 2.x and ipython3 is for python 3.x

Thanks,
santosh

On Sun, Mar 15, 2015 at 3:47 AM, Oscar Benjamin 
wrote:

> On 14 March 2015 at 09:53, Steven D'Aprano  wrote:
> > On Fri, Mar 13, 2015 at 10:39:50PM +0530, Santosh Kumar wrote:
> >> Hi All,
> >>
> >> I have installed both python2 and python3 in my system . When i used
> >> ipython it by default goes to python2 base. How/what is the easy way to
> >> swith between python2 and python3 ?
> >
> > I don't think there is an easy way on Windows, but I could be wrong. You
> > could try asking on a dedicated iPython mailing list. If you get an
> > answer, please come back and tell us here so we can learn too.
>
> When you install ipython (or any Python package) you install it for a
> particular Python version. You haven't said how you installed either
> of the Python versions or ipython or which version of Python you
> installed ipython for.
>
> Assuming that you have installed ipython for Python 3 then you may be
> able to run ipython for Python 3 by typing one of the following in a
> terminal:
>
> $ ipython3
>
> $ python3 -m IPython
>
> $ py -3 -m IPython
>
> (Note carefully that the I and P at the start of IPython in the last
> two examples are capitalised - the first example is all lower case).
>
> You may find that ipython is in the "programs" menu on Windows. I'm
> not really sure how that stuff works on newer versions of Windows
> though.
>
> Without knowing more about your setup it's hard to be specific about
> what you should do. What OS are you using (e.g. Windows 8?)? How did
> you install Python 2 and Python 3 and which versions (e.g. 2.7 and
> 3.4?). How did you install ipython? Which version of Python did you
> install it for? Do you know what folder the Python installations are
> in (e.g. C:\Python34)?
>
>
> Oscar
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>



-- 
D. Santosh Kumar
RHCE | SCSA
+91-9703206361


Every task has a unpleasant side .. But you must focus on the end result
you are producing.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Ipython Queries

2015-03-14 Thread Oscar Benjamin
On 14 March 2015 at 09:53, Steven D'Aprano  wrote:
> On Fri, Mar 13, 2015 at 10:39:50PM +0530, Santosh Kumar wrote:
>> Hi All,
>>
>> I have installed both python2 and python3 in my system . When i used
>> ipython it by default goes to python2 base. How/what is the easy way to
>> swith between python2 and python3 ?
>
> I don't think there is an easy way on Windows, but I could be wrong. You
> could try asking on a dedicated iPython mailing list. If you get an
> answer, please come back and tell us here so we can learn too.

When you install ipython (or any Python package) you install it for a
particular Python version. You haven't said how you installed either
of the Python versions or ipython or which version of Python you
installed ipython for.

Assuming that you have installed ipython for Python 3 then you may be
able to run ipython for Python 3 by typing one of the following in a
terminal:

$ ipython3

$ python3 -m IPython

$ py -3 -m IPython

(Note carefully that the I and P at the start of IPython in the last
two examples are capitalised - the first example is all lower case).

You may find that ipython is in the "programs" menu on Windows. I'm
not really sure how that stuff works on newer versions of Windows
though.

Without knowing more about your setup it's hard to be specific about
what you should do. What OS are you using (e.g. Windows 8?)? How did
you install Python 2 and Python 3 and which versions (e.g. 2.7 and
3.4?). How did you install ipython? Which version of Python did you
install it for? Do you know what folder the Python installations are
in (e.g. C:\Python34)?


Oscar
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Ipython Queries

2015-03-14 Thread Steven D'Aprano
On Fri, Mar 13, 2015 at 10:39:50PM +0530, Santosh Kumar wrote:
> Hi All,
> 
> I have installed both python2 and python3 in my system . When i used
> ipython it by default goes to python2 base. How/what is the easy way to
> swith between python2 and python3 ?

I don't think there is an easy way on Windows, but I could be wrong. You 
could try asking on a dedicated iPython mailing list. If you get an 
answer, please come back and tell us here so we can learn too.

On Linux, install the ipython3 package. On Debian or Ubuntu systems, 
try:

sudo aptitude install ipython3

and then run ipython3 instead of ipython. On Centos or Fedora systems:

sudo yum install ipython3

will probably work if your system isn't too old.

Or, you could try the instructions shown here:

http://stackoverflow.com/questions/9386048/ipython-reads-wrong-python-version

but I would be surprised if it works.

(I just tried it, and it failed. You need to install all the ipython 
libraries into Python 3.)


-- 
Steve
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Ipython Queries

2015-03-13 Thread Albert-Jan Roskam




- Original Message -
> From: Santosh Kumar 
> To: python mail list 
> Cc: 
> Sent: Friday, March 13, 2015 6:09 PM
> Subject: [Tutor] Ipython Queries
> 
> Hi All,
> 
> I have installed both python2 and python3 in my system . When i used
> ipython it by default goes to python2 base. How/what is the easy way to
> swith between python2 and python3 ?


The easy way? Dunno. I would love to know about it. Meanwhile, I use:


Python 3.4.2 (default, Nov 21 2014, 20:13:40) 
[GCC 4.7.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import IPython; IPython.start_ipython(argv=[])
Python 3.4.2 (default, Nov 21 2014, 20:13:40) 
Type "copyright", "credits" or "license" for more information.

IPython 2.4.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help  -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: 
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] Ipython Queries

2015-03-13 Thread Santosh Kumar
Hi All,

I have installed both python2 and python3 in my system . When i used
ipython it by default goes to python2 base. How/what is the easy way to
swith between python2 and python3 ?

Thanks,
santosh
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor