Quantcast

IPython in windows

classic Classic list List threaded Threaded
10 messages Options
smk
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

IPython in windows

smk
I am using IPython 0.13 in windows. It works fine but when I type something like

 print 'Hello World'
and press Shift+Enter it doesn't print anything the only is In [*]: print 'Hello World'

instead of * it must appear a number.

At cmd I type: ipython notebook --pylab=inline

I can open files from Ipython notebook, I can create new but I can not print anything.

Could you help me?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: IPython in windows

klo uo
Can you try Opera browser and see if you can get output?

I had same problem, some weeks ago, when cells did not want to execute in Firefox and Chrome, but somehow Opera pass it through.


On Sat, Oct 13, 2012 at 4:47 PM, smk <[hidden email]> wrote:
I am using IPython 0.13 in windows. It works fine but when I type something
like

 print 'Hello World'
and press Shift+Enter it doesn't print anything the only is In [*]: print
'Hello World'

instead of * it must appear a number.

At cmd I type: ipython notebook --pylab=inline

I can open files from Ipython notebook, I can create new but I can not print
anything.

Could you help me?



--
View this message in context: http://python.6.n6.nabble.com/IPython-in-windows-tp4992137.html
Sent from the IPython - User mailing list archive at Nabble.com.
_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user


_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: IPython in windows

klo uo
On Sun, Oct 14, 2012 at 1:30 AM, klo uo wrote:
Can you try Opera browser and see if you can get output?

You'll need to enable websockets in Opera settings first, as it's disabled by default

_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
smk
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: IPython in windows

smk
I enable them through this instructions http://techdows.com/2010/12/enable-websockets-in-opera-11.html

but the problem still the same. Could you tell what steps did you do?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: IPython in windows

Thomas Kluyver-2
In reply to this post by smk
Do you have any internet security software, like a firewall? Some
other users have reported problems with overzealous security software.

Thomas

On 13 October 2012 15:47, smk <[hidden email]> wrote:

> I am using IPython 0.13 in windows. It works fine but when I type something
> like
>
>  print 'Hello World'
> and press Shift+Enter it doesn't print anything the only is In [*]: print
> 'Hello World'
>
> instead of * it must appear a number.
>
> At cmd I type: ipython notebook --pylab=inline
>
> I can open files from Ipython notebook, I can create new but I can not print
> anything.
>
> Could you help me?
>
>
>
> --
> View this message in context: http://python.6.n6.nabble.com/IPython-in-windows-tp4992137.html
> Sent from the IPython - User mailing list archive at Nabble.com.
> _______________________________________________
> IPython-User mailing list
> [hidden email]
> http://mail.scipy.org/mailman/listinfo/ipython-user
_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
smk
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: IPython in windows

smk
No I don't user firewall.

Here what the cmd print when I open a new notebook, type something and try to run it.

[NotebookApp] Using existing profile dir: u'C:\\Users\\\u039c\u0391\u0399\u03a1\
u0397\\.ipython\\profile_default'
[NotebookApp] Serving notebooks from C:\Users\sm
[NotebookApp] The port 8888 is already in use, trying another random port.
[NotebookApp] The IPython Notebook is running at: http://127.0.0.1:8889/
[NotebookApp] Use Control-C to stop this server and shut down all kernels.
[NotebookApp] Using MathJax from CDN: http://cdn.mathjax.org/mathjax/latest/Math
Jax.js
ERROR:root:Uncaught exception POST /kernels?notebook=24f8c716-8d7e-423d-9dd3-7d7
c4297eae5 (127.0.0.1)
HTTPRequest(protocol='http', host='127.0.0.1:8889', method='POST', uri='/kernels
?notebook=24f8c716-8d7e-423d-9dd3-7d7c4297eae5', version='HTTP/1.1', remote_ip='
127.0.0.1', body='', headers={'Origin': '<a href="http://127.0.0.1:8889'">http://127.0.0.1:8889', 'Content-Length
': '0', 'Accept-Language': 'el-GR,el;q=0.8', 'Accept-Encoding': 'gzip,deflate,sd
ch', 'Host': '127.0.0.1:8889', 'Accept': 'application/json, text/javascript, */*
; q=0.01', 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4
(KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4', 'Accept-Charset': 'ISO-88
59-7,utf-8;q=0.7,*;q=0.3', 'Connection': 'keep-alive', 'X-Requested-With': 'XMLH
ttpRequest', 'Referer': 'http://127.0.0.1:8889/new'})
Traceback (most recent call last):
  File "c:\python27\lib\site-packages\tornado\web.py", line 1042, in _execute
    getattr(self, self.request.method.lower())(*args, **kwargs)
  File "c:\python27\lib\site-packages\tornado\web.py", line 1809, in wrapper
    return method(self, *args, **kwargs)
  File "c:\python27\lib\site-packages\IPython\frontend\html\notebook\handlers.py
", line 335, in post
    kernel_id = km.start_kernel(notebook_id, cwd=nbm.notebook_dir)
  File "c:\python27\lib\site-packages\IPython\frontend\html\notebook\kernelmanag
er.py", line 274, in start_kernel
    kernel_id = super(MappingKernelManager, self).start_kernel(**kwargs)
  File "c:\python27\lib\site-packages\IPython\frontend\html\notebook\kernelmanag
er.py", line 89, in start_kernel
    km.start_kernel(**kwargs)
  File "c:\python27\lib\site-packages\IPython\zmq\kernelmanager.py", line 806, i
n start_kernel
    self.kernel = launch_kernel(fname=self.connection_file, **kw)
  File "c:\python27\lib\site-packages\IPython\zmq\ipkernel.py", line 869, in lau
nch_kernel
    *args, **kwargs)
  File "c:\python27\lib\site-packages\IPython\zmq\entry_point.py", line 189, in
base_launch_kernel
    stdin=_stdin, stdout=_stdout, stderr=_stderr)
  File "C:\Python27\lib\subprocess.py", line 679, in __init__
    errread, errwrite)
  File "C:\Python27\lib\subprocess.py", line 893, in _execute_child
    startupinfo)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 86-90: ord
inal not in range(128)
ERROR:root:500 POST /kernels?notebook=24f8c716-8d7e-423d-9dd3-7d7c4297eae5 (127.
0.0.1) 23.00ms
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: IPython in windows

Thomas Kluyver-2
On 14 October 2012 11:03, smk <[hidden email]> wrote:

>   File "c:\python27\lib\site-packages\IPython\zmq\kernelmanager.py", line
> 806, i
> n start_kernel
>     self.kernel = launch_kernel(fname=self.connection_file, **kw)
>   File "c:\python27\lib\site-packages\IPython\zmq\ipkernel.py", line 869, in
> lau
> nch_kernel
>     *args, **kwargs)
>   File "c:\python27\lib\site-packages\IPython\zmq\entry_point.py", line 189,
> in
> base_launch_kernel
>     stdin=_stdin, stdout=_stdout, stderr=_stderr)
>   File "C:\Python27\lib\subprocess.py", line 679, in __init__
>     errread, errwrite)
>   File "C:\Python27\lib\subprocess.py", line 893, in _execute_child
>     startupinfo)
> UnicodeEncodeError: 'ascii' codec can't encode characters in position 86-90:
> ord

Ah, it seems to be having trouble because the Ipython directory, and
hence the connection file, has non-ascii characters in the path.
Please file an issue about that:
https://github.com/ipython/ipython/issues

In the meantime, if you set the environment variable IPYTHONDIR to a
location with only ascii characters, like C:\ipython, it should work.

Thomas
_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
smk
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: IPython in windows

smk
This post has NOT been accepted by the mailing list yet.
Thank you for your answer. I will try this.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: IPython in windows

Carlos Córdoba
In reply to this post by Thomas Kluyver-2
Thomas, you can see from the first lines of reporter's error message:

[NotebookApp] Using existing profile dir:
u'C:\\Users\\\u039c\u0391\u0399\u03a1\
u0397\\.ipython\\profile_default'

that his trouble comes from the fact his home dir is non-ascii
(something that unfortunately Windows allows). We had to suffer this
situation in Spyder until we solved it six months ago.

Our solution was to add a couple of helper functions to deal with
strings that come from the filesystem and use them to enconde/decode
users home dir. You can find them here, in case you need them:

http://code.google.com/p/spyderlib/source/browse/spyderlib/utils/encoding.py#31

Cheers,
Carlos

El 15/10/12 09:33, Thomas Kluyver escribió:

> On 14 October 2012 11:03, smk <[hidden email]> wrote:
>>    File "c:\python27\lib\site-packages\IPython\zmq\kernelmanager.py", line
>> 806, i
>> n start_kernel
>>      self.kernel = launch_kernel(fname=self.connection_file, **kw)
>>    File "c:\python27\lib\site-packages\IPython\zmq\ipkernel.py", line 869, in
>> lau
>> nch_kernel
>>      *args, **kwargs)
>>    File "c:\python27\lib\site-packages\IPython\zmq\entry_point.py", line 189,
>> in
>> base_launch_kernel
>>      stdin=_stdin, stdout=_stdout, stderr=_stderr)
>>    File "C:\Python27\lib\subprocess.py", line 679, in __init__
>>      errread, errwrite)
>>    File "C:\Python27\lib\subprocess.py", line 893, in _execute_child
>>      startupinfo)
>> UnicodeEncodeError: 'ascii' codec can't encode characters in position 86-90:
>> ord
> Ah, it seems to be having trouble because the Ipython directory, and
> hence the connection file, has non-ascii characters in the path.
> Please file an issue about that:
> https://github.com/ipython/ipython/issues
>
> In the meantime, if you set the environment variable IPYTHONDIR to a
> location with only ascii characters, like C:\ipython, it should work.
>
> Thomas
> _______________________________________________
> IPython-User mailing list
> [hidden email]
> http://mail.scipy.org/mailman/listinfo/ipython-user

_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: IPython in windows

Thomas Kluyver-2
On 15 October 2012 21:05, Carlos Córdoba <[hidden email]> wrote:
> Thomas, you can see from the first lines of reporter's error message:
>
> [NotebookApp] Using existing profile dir:
> u'C:\\Users\\\u039c\u0391\u0399\u03a1\
> u0397\\.ipython\\profile_default'

Thanks Carlos - I had spotted that line too. We've fixed lots of
unicode bugs before, and Jörgen does an excellent job of spotting them
on Windows, but it seems this one has slipped through.

Thomas
_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Loading...