I expected to find more documentation on the following:
From one computer:
<?php $tablet_browser = 0; $mobile_browser = 0; if (preg_match('/(tablet|ipad|playbook)|(android(?!.*(mobi|opera mini)))/i', strtolower($_SERVER['HTTP_USER_AGENT']))) { $tablet_browser++; } if (preg_match('/(up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone|android|iemobile)/i', strtolower($_SERVER['HTTP_USER_AGENT']))) { $mobile_browser++; } if ((strpos(strtolower($_SERVER['HTTP_ACCEPT']),'application/vnd.wap.xhtml+xml') > 0) or ((isset($_SERVER['HTTP_X_WAP_PROFILE']) or isset($_SERVER['HTTP_PROFILE'])))) { $mobile_browser++; } $mobile_ua = strtolower(substr($_SERVER['HTTP_USER_AGENT'], 0, 4)); $mobile_agents = array( 'w3c ','acs-','alav','alca','amoi','audi','avan','benq','bird','blac', 'blaz','brew','cell','cldc','cmd-','dang','doco','eric','hipt','inno', 'ipaq','java','jigs','kddi','keji','leno','lg-c','lg-d','lg-g','lge-', 'maui','maxo','midp','mits','mmef','mobi','mot-','moto','mwbp','nec-', 'newt','noki','palm','pana','pant','phil','play','port','prox', 'qwap','sage','sams','sany','sch-','sec-','send','seri','sgh-','shar', 'sie-','siem','smal','smar','sony','sph-','symb','t-mo','teli','tim-', 'tosh','tsm-','upg1','upsi','vk-v','voda','wap-','wapa','wapi','wapp', 'wapr','webc','winw','winw','xda ','xda-'); if (in_array($mobile_ua,$mobile_agents)) { $mobile_browser++; } if (strpos(strtolower($_SERVER['HTTP_USER_AGENT']),'opera mini') > 0) { $mobile_browser++; //Check for tablets on opera mini alternative headers $stock_ua = strtolower(isset($_SERVER['HTTP_X_OPERAMINI_PHONE_UA'])?$_SERVER['HTTP_X_OPERAMINI_PHONE_UA']:(isset($_SERVER['HTTP_DEVICE_STOCK_UA'])?$_SERVER['HTTP_DEVICE_STOCK_UA']:'')); if (preg_match('/(tablet|ipad|playbook)|(android(?!.*mobile))/i', $stock_ua)) { $tablet_browser++; } } /*if ($tablet_browser > 0) { // do something for tablet devices // echo 'is tablet'; } else if ($mobile_browser > 0) { // do something for mobile devices echo 'is mobile'; } else { // do something for everything else // echo 'is desktop'; } */ ?>
opens the browser as 'IPython Notebook'.From second computer:
C:\Python>ipython notebook
opens the browser as 'Jupyter'.
I dont have a preference, but when saving from the 'Jupyter' browser, I can no longer open a .ipnb file in the 'IPython Notebook' browser. I encounter a "bad request" error.
Initially I assumed that 'ipython notebook' had been updated to use 'Jupyter' as its browser so I updated (C:\Python>ipython notebook
) on both computers with no effect. Clearly I am missing something.
Did pip install "ipython[notebook]"
switch to using Jupyter? If so, am I incorrectly updating IPython?
答案 0 :(得分:26)
ipython Notebook现在被称为Jupyter,所以可能在另一台计算机上安装了不同版本的Anaconda?
所以Jupyter是ipython Notebook将继续发展的东西 - 他们放弃了python,因为它基本上是&#34;不可知的&#34;现在:它可以加载不同的语言 - python 2或3,还有R,Julia等。
关于Jupyter的有用视频intro
你可以尝试:
pip install --upgrade "ipython[all]"
答案 1 :(得分:24)
ipython
仍然是一个活跃的项目 - 一个交互式的python程序。 jupyter
是一个与语言无关的应用,可以从 ipython
分支(具体来说,ipython notebook
)。
jupyter notebook
是ipython
版本的概括----它现在是一个网络应用程序,可以用作各种不同语言的笔记本(不仅仅是{{ 1}})。 python
仍然使用jupyter notebook
作为&#39;内核&#39;用于运行python代码。
至于您问题的实际方面:将来,您应该使用ipython
来启动笔记本,而不是jupyter
。它现在存在于所有标准包管理员。
来自ipython主页:
Jupyter and the future of IPython
IPython是一个不断发展的项目,与语言无关 组件。 IPython 3.x是IPython的最后一个单片版本, 包含笔记本服务器,qtconsole等。从IPython 4.0开始 与项目无关的语言部分:笔记本格式,消息 协议,qtconsole,笔记本web应用程序等已经转移到新的 Jupyter名下的项目。 IPython本身就是关注的焦点 交互式Python,其中一部分是为Python提供内核 Jupyter。