安装启动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/.

安装启动ipython notebook Getting Up and Running with Python_第1张图片

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/.

安装启动ipython notebook Getting Up and Running with Python_第2张图片

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:

安装启动ipython notebook Getting Up and Running with Python_第3张图片

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.

你可能感兴趣的:(安装启动ipython notebook Getting Up and Running with Python)