我试图用非默认浏览器启动IPython(在我的情况下是Firefox),并且我认为我可以复制复制该博客中给出的脚本
我在Windows 7上
我把以下代码放在一个文件中说"module.py"
import subprocess
subprocess.call("ipython notebook --no-browser", shell=True)
subprocess.call([r'C:\Program Files (x86)\Mozilla Firefox\Firefox.exe', '-new-tab', 'http://127.0.0.1:8888/'])
Run Code Online (Sandbox Code Playgroud)
但是,当我从命令行运行它时
python C:\Users\mugabal\Desktop\module1.py
Run Code Online (Sandbox Code Playgroud)
它执行第一行而不是第二行(两行都单独工作)
我的问题(用更通用的术语)我如何启动一个进程并告诉它不要高举控制台窗口?
如果我已经监督了一个明显的解释,我提前道歉,但我在子流程文档和这个平台上都看了
-----更新-----
我应该补充一点,我试图用选定的浏览器启动IPython,但无法弄清楚如何让它工作
>ipython notebook --browser='C:\Program Files (x86)\Mozilla Firefox\Firefox.exe'
...
[NotebookApp] The IPython Notebook is running at: http://127.0.0.1:8888/
...
**[NotebookApp] No web browser found: could not locate runnable browser.**
Run Code Online (Sandbox Code Playgroud)
确切地说,Windows命令提示符窗口中的以下命令按预期工作:
start firefox
Run Code Online (Sandbox Code Playgroud)
但
ipython notebook --browser=firefox
Run Code Online (Sandbox Code Playgroud)
不起作用(与上面相同的错误).
我正在使用python3.5和jupyter 4.0.6.我启动了jupyter notebook,并得到以下输出:
[I 21:47:27.021 NotebookApp] Serving notebooks from local directory: /home/nitrous
[I 21:47:27.021 NotebookApp] 0 active kernels
[I 21:47:27.021 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/
[I 21:47:27.022 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 21:47:27.023 NotebookApp] No web browser found: could not locate runnable browser.
Run Code Online (Sandbox Code Playgroud)
在我的firefox浏览器上,我键入了指定的localhost url:http://localhost:8888/但是我收到unable to connect错误消息.我错过了什么?是这一行的问题的暗示:
[W 21:47:27.023 NotebookApp] No web browser …Run Code Online (Sandbox Code Playgroud)