安裝啟動(dòng)ipython notebook Getting Up and Running with Python

Getting Up and Running with Python

When just starting out with Python, it can be extremely difficult to get things up and running smoothly. You should have a reasonably high chance of success if you follow these instructions; however, there are still countless things that could go wrong, so if something doesn’t work for you and you work through a solution, please post the problem and solution in the comments so that others can benefit.

Mac

Go tohttp://continuum.io/downloads, scroll down to the downloads section and download the installer for the appropriate version.

Find the Anaconda .pkg file in your Downloads folder, double click it, and follow the instructions on your screen. Note: There is a bug in the OS X installer that will require you to click“Install for me only.”at some point during the installation. If you run into issues or want more info, check outhttp://docs.continuum.io/anaconda/install.html#mac-install.

Look on your desktop for the Anaconda Launcher Icon

and double click it. Note: if it is not on your desktop, search for “Launcher” to find it. A search for anaconda will only turn up the installer pkg file.

Click the blue launch button

next to ipython-notebook to launch your IPython Notebook web server.

Some people experienced problems when running 64bit Anaconda on Mac OS X. If you get the following error:ValueError: unknown locale: UTF-8, please update your locale setting as advisedhere.

Go tohttp://127.0.0.1:8888/using your browser of choice. IPython Notebook should be running. If it isn’t running there, tryhttp://127.0.0.1:8889/orhttp://127.0.0.1:8890/.

Click the“New Notebook”button on the right.

Click on“Untitled0”at the top and type in“My First IPython Notebook”(or whatever you want) to rename your notebook.

You should see a box withIn [ ]:in it. Click to the right ofIn [ ]:and copy and paste the following code:

In?[1]:

foriinrange(4):printi," I am ready to do some statistical learning in Python!"ifi==0:print'"R" you surprised that Python starts its index at 0 instead of 1?'

0? I am ready to do some statistical learning in Python!

"R" you surprised that Python starts its index at 0 instead of 1?

1? I am ready to do some statistical learning in Python!

2? I am ready to do some statistical learning in Python!

3? I am ready to do some statistical learning in Python!

Click on the run button

and check out the output. Great success! [ hopefully

]

If you want to open up an existing IPython Notebook, click on the IP[y]: Notebook logo and drag/drop the file onto the list of notebooks or click the “click here” text to browse your filesystem and select the file. You can download the first IPython Notebooks in our serieshere.

Linux (Ubuntu)

Go tohttp://continuum.io/downloads, scroll down to the downloads section and download the appropriate installer for your architecture.

Open a terminal and navigate to the package you just downloaded.

Runchmod +x Anaconda-.sh

Then run./Anaconda-.sh. The installer will begin running.

Hit Enter to view the License agreement. Press Space to continue reading.

Typeyesto accept this license agreement. Then hit Enter.

Hit Enter if the default installation directory is fine to install into. Anaconda will begin its installation.

Typeyesto add the Anaconda PATH to your~/.bashrc. Then hit Enter.

To start the IPython Notebook server, run the following commmand from a new terminal:$ ipython notebook

Go tohttp://127.0.0.1:8888/using your browser of choice. IPython Notebook should be running. If it isn’t running there, tryhttp://127.0.0.1:8889/orhttp://127.0.0.1:8890/.

Click the“New Notebook”button on the right.

Click on“Untitled0”at the top and type in“My First IPython Notebook”(or whatever you want) to rename your notebook.

You should see a box withIn [ ]:in it. Click to the right ofIn [ ]:and copy and paste the following code:

In?[2]:

foriinrange(4):printi," I am ready to do some statistical learning in Python!"ifi==0:print'"R" you surprised that Python starts its index at 0 instead of 1?'

0? I am ready to do some statistical learning in Python!

"R" you surprised that Python starts its index at 0 instead of 1?

1? I am ready to do some statistical learning in Python!

2? I am ready to do some statistical learning in Python!

3? I am ready to do some statistical learning in Python!

Click on the run button

and check out the output. Great success! [ hopefully

]

If you want to open up an existing IPython Notebook, click on the IP[y]: Notebook logo and drag/drop the file onto the list of notebooks or click the “click here” text to browse your filesystem and specify the file. You can download the first IPython Notebooks in our serieshere.

Windows

Go tohttp://continuum.io/downloads, scroll down to the downloads section and download the Windows installer for the appropriate architecture (64bit or 32bit).

Find theAnaconda--Windows-x86_.exefile in your Downloads folder, double click it, and follow the instructions on your screen. Make sure that you check the box’Add Anaconda to the System Path’.

Once Anaconda is installed you can find an Anaconda folder in the Windows start menu.

Click onIPython (Py 2.7) Notebook; this will open a terminal window and shortly thereafter a new browser window should appear that shows theIP[y]: Notebooklogo on the top left:

Click the“New Notebook”button on the right.

Click on“Untitled0”at the top and type in“My First IPython Notebook”(or whatever you want) to rename your notebook.

You should see a box with In [ ]: in it. Click to the right of In [ ]: and copy and paste the following code:

In?[3]:

foriinrange(4):printi," I am ready to do some statistical learning in Python!"ifi==0:print'"R" you surprised that Python starts its index at 0 instead of 1?'

0? I am ready to do some statistical learning in Python!

"R" you surprised that Python starts its index at 0 instead of 1?

1? I am ready to do some statistical learning in Python!

2? I am ready to do some statistical learning in Python!

3? I am ready to do some statistical learning in Python!

Click on the run button

and check out the output. Great success! [ hopefully

]

If you want to open up an existing IPython Notebook, click on the IP[y]: Notebook logo and drag/drop the file onto the list of notebooks or click the “click here” text to browse your filesystem and specify the file. You can download the first IPython Notebooks in our serieshere.

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末碎连,一起剝皮案震驚了整個(gè)濱河市向族,隨后出現(xiàn)的幾起案子赖钞,更是在濱河造成了極大的恐慌垦搬,老刑警劉巖钻哩,帶你破解...
    沈念sama閱讀 221,548評(píng)論 6 515
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件丧鸯,死亡現(xiàn)場(chǎng)離奇詭異庄蹋,居然都是意外死亡杰妓,警方通過查閱死者的電腦和手機(jī)钝吮,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 94,497評(píng)論 3 399
  • 文/潘曉璐 我一進(jìn)店門埋涧,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人奇瘦,你說我怎么就攤上這事棘催。” “怎么了耳标?”我有些...
    開封第一講書人閱讀 167,990評(píng)論 0 360
  • 文/不壞的土叔 我叫張陵醇坝,是天一觀的道長。 經(jīng)常有香客問我次坡,道長呼猪,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 59,618評(píng)論 1 296
  • 正文 為了忘掉前任砸琅,我火速辦了婚禮宋距,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘明棍。我一直安慰自己乡革,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 68,618評(píng)論 6 397
  • 文/花漫 我一把揭開白布摊腋。 她就那樣靜靜地躺著沸版,像睡著了一般。 火紅的嫁衣襯著肌膚如雪兴蒸。 梳的紋絲不亂的頭發(fā)上视粮,一...
    開封第一講書人閱讀 52,246評(píng)論 1 308
  • 那天,我揣著相機(jī)與錄音橙凳,去河邊找鬼蕾殴。 笑死笑撞,一個(gè)胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的钓觉。 我是一名探鬼主播茴肥,決...
    沈念sama閱讀 40,819評(píng)論 3 421
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場(chǎng)噩夢(mèng)啊……” “哼荡灾!你這毒婦竟也來了瓤狐?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 39,725評(píng)論 0 276
  • 序言:老撾萬榮一對(duì)情侶失蹤批幌,失蹤者是張志新(化名)和其女友劉穎础锐,沒想到半個(gè)月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體荧缘,經(jīng)...
    沈念sama閱讀 46,268評(píng)論 1 320
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡皆警,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 38,356評(píng)論 3 340
  • 正文 我和宋清朗相戀三年,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了截粗。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片信姓。...
    茶點(diǎn)故事閱讀 40,488評(píng)論 1 352
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡,死狀恐怖桐愉,靈堂內(nèi)的尸體忽然破棺而出财破,到底是詐尸還是另有隱情,我是刑警寧澤从诲,帶...
    沈念sama閱讀 36,181評(píng)論 5 350
  • 正文 年R本政府宣布左痢,位于F島的核電站,受9級(jí)特大地震影響系洛,放射性物質(zhì)發(fā)生泄漏俊性。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,862評(píng)論 3 333
  • 文/蒙蒙 一描扯、第九天 我趴在偏房一處隱蔽的房頂上張望定页。 院中可真熱鬧,春花似錦绽诚、人聲如沸典徊。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,331評(píng)論 0 24
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽卒落。三九已至,卻和暖如春蜂桶,著一層夾襖步出監(jiān)牢的瞬間儡毕,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 33,445評(píng)論 1 272
  • 我被黑心中介騙來泰國打工扑媚, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留腰湾,地道東北人雷恃。 一個(gè)月前我還...
    沈念sama閱讀 48,897評(píng)論 3 376
  • 正文 我出身青樓,卻偏偏與公主長得像费坊,于是被迫代替她去往敵國和親倒槐。 傳聞我的和親對(duì)象是個(gè)殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 45,500評(píng)論 2 359

推薦閱讀更多精彩內(nèi)容