ipython與sublime調用其shell出現的問題

來源:互聯網
上載者:User

標籤:ipy   完成後   file   enc   pre   uil   site   ...   conda   

本機電腦 win10

已安裝python3.5

 

 1.    直接在命令列運行 pip install ipython[all] 安裝 ipython

安裝完成後

在命令列輸入 jupyter notebook 即可看到瀏覽器中的ipython notebook 介面

2. 然後在sunlime3的preferences < key building<中的user 編輯介面中設定了ipython shell的快速鍵

{

      "keys": ["f6"],

      "caption": "SublimeREPL: Python - IPython",

      "command": "run_existing_window_command","args":

      {"id": "repl_python_ipython",

      "file":"config/python/Main.sublime-menu"}

  }

儲存後。按F6,出現類似如下報錯:IPython 4.0

>C:\Anaconda\lib\site-packages\IPython\config.py:13: ShimWarning: 

The`IPython.config` package has been deprecated. You should import from 

traitlets.config instead.

"You should import from traitlets.config instead.", ShimWarning)

 

C:\Anaconda\lib\site-packages\IPython\terminal\console.py:13: ShimWarning:  

The `IPython.terminal.console` package has been deprecated. You should 

import from jupyter_console instead.

"You should import from jupyter_console instead.", ShimWarning)

C:\Anaconda\lib\site-packages\IPython\frontend.py:21: ShimWarning: The top-

level `frontend` package has been deprecated. All its subpackages have been 

moved to the top `IPython` level.

"All its subpackages have been moved to the top `IPython` level.", 

ShimWarning)...

 於是根據stackoverflow

https://stackoverflow.com/questions/32719352/ipython-4-shell-does-not-work-with-sublime-repl上的步驟

及連結

https://gist.githubusercontent.com/MattDMo/6cb1dfbe8a124e1ca5af/raw/a511e86dde7b3a70bdbd63b7ac3c98c32cd74277/ipy_repl.py

3.  安裝jupyter  pip install -U ipython jupyter

4. 變更檔C:...\Sublime Text 3\Packages\SublimeREPL\config\Python\ipy_repl.py中的代碼,儲存後,按F6.

又出現了類似如下報錯:

 於是按照https://www.zhihu.com/question/54388483中的步驟將

5. C:...\Sublime Text 3\Packages\SublimeREPL\config\Python\Main.sublime-menu中的代碼部分做了修改

修改其中id為“repl_python_ipython”的配置項,將"windows"項由

"windows":["python", "-u", "${packages}/SublimeREPL/config/Python/ipy_repl.py"]

改為你的ipython程式路徑,具體如下:

"windows": ["C:.../Python/Python35/Scripts/ipython.exe"]

 

如此儲存後,再按F6,就成功在sublime中調出ipython的shell了

ipython與sublime調用其shell出現的問題

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.