Python Install Anaconda Mac

broken image


There are multiple ways of installing IPython. This page contains simplified installationinstructions that should work for most users. Our official documentationcontains more detailed instructionsfor manual installation targeted at advanced users and developers.

If you are looking for installation documentation for the notebook and/or qtconsole,those are now part of Jupyter.

I already have Python¶

インストール直後の状態では、ターミナルなどからAnacondaのPythonなどを利用できません。次のようにして、 conda コマンドを利用できるようにします。 ターミナルを起動し、つぎのコマンドを実行します。. Once done, Anaconda will be installed. Install R Mac users. Step 1) Anaconda uses the terminal to install libraries. The terminal is a quick way to install libraries. We need to be sure to point the installation toward the right path. In our case, we set the location of Anaconda to the Users/USERNAME/. Anaconda works on Windows, Mac, and Linux, provides over 1,500 Python/R packages, and is used by over 15 million people. Anaconda is best suited to beginning users; it provides a large collection of libraries all in one.

If you already have Python installed and are familiar with installing packages, you can get IPython with pip:

I am getting started with Python¶

For new users who want to install a full Python environment for scientific computing anddata science, we suggest installing the Anaconda or Canopy Python distributions, which provide Python, IPython and all of its dependences as well as a complete set of open source packagesfor scientific computing and data science.

  1. Download and install Continuum's Anaconda or the free edition of Enthought's Canopy.
  2. Update IPython to the current version using the Terminal:

Anaconda:

Enthought Canopy:

Downloads¶

You can manually download IPython from GitHub or PyPI. To install one of these versions, unpack it and runthe following from the top-level source directory using the Terminal:

Anaconda Individual Edition contains condaand Anaconda Navigator,as well as Python and hundreds of scientificpackages. When you installed Anaconda,you installed all these too.

Conda works on your command line interface such asAnaconda Prompt on Windows and terminal on macOS and Linux.

Navigator is a desktop graphical user interface thatallows you to launch applications and easily manageconda packages, environments, and channels withoutusing command-line commands.

You can try both conda and Navigatorto see which is right for you to manage your packages andenvironments. You can even switch between them, and the work youdo with one can be viewed in the other.

Try this simple programming exercise, with Navigator and thecommand line, to help you decide which approach is right for you.

When you're done, see What's next?.

Your first Python program: Hello, Anaconda!¶

Use Anaconda Navigator to launch an application. Then, create and runa simple Python program with Spyder and Jupyter Notebook.

Open Navigator¶

Choose the instructions for your operating system.

How To Install Conda Mac

  • Windows.
  • macOS.
  • Linux.

Windows

From the Start menu, click the Anaconda Navigator desktop app.

macOS

Open Launchpad, then click the Anaconda Navigator icon.

Linux

Open a terminal window and type anaconda-navigator.

Run Python in Spyder IDE (integrated development environment)¶

Tip

Navigator's Home screen displays several applications for you tochoose from. For more information, see links at the bottom of this page.

  1. On Navigator's Home tab, in the Applications pane on the right, scrollto the Spyder tile and click the Install button to install Spyder.

    Note

    If you already have Spyder installed, you can jump right to theLaunch step.

  2. Launch Spyder by clicking Spyder's Launch button.

  3. In the new file on the left, delete any placeholder text, then type orcopy/paste print('HelloAnaconda').

  4. In the top menu, click File - Save As and name your new programhello.py.

  5. Run your new program by clicking the triangle Run button.

  6. You can see your program's output in the bottom right Console pane.

Close Spyder¶

From Spyder's top menu bar, select Spyder - Quit Spyder (In macOS,select Python - Quit Spyder).

Run Python in a Jupyter Notebook¶

Install Anaconda And Python Mac

  1. On Navigator's Home tab, in the Applications pane on the right, scrollto the Jupyter Notebook tile and click the Install button to install JupyterNotebook.

    Note

    If you already have Jupyter Notebook installed, you can jump right tothe Launch step.

  2. Launch Jupyter Notebook by clicking Jupyter Notebook's Launch button.

    This will launch a new browser window (or a new tab) showing theNotebook Dashboard.

  3. On the top of the right hand side, there is a dropdown menu labeled 'New'.Create a new Notebook with the Python version you installed.

  4. Rename your Notebook. Either click on the current name and edit it orfind rename under File in the top menu bar.You can name it to whatever you'd like, but for this example we'll useMyFirstAnacondaNotebook.

  5. In the first line of the Notebook, type or copy/pasteprint('HelloAnaconda').

  6. Save your Notebook by either clicking the save and checkpointicon or select File - Save and Checkpoint in the top menu.

  7. Run your new program by clicking the Run button or selectingCell - Run All from the top menu.

Close Jupyter Notebook¶

Anaconda
  1. From Jupyter Notebooks top menu bar, select File - Close and Halt.
  2. Click the Quit button at the upper right of the Notebook Dashboardand close the window or tab.

Close Navigator¶

From Navigator's top menu bar, select Anaconda Navigator - QuitAnaconda-Navigator.

Write a Python program using Anaconda Prompt or terminal¶

Open Anaconda Prompt¶

Choose the instructions for your operating system.

  • Windows.
  • macOS.
  • Linux.

Windows

From the Start menu, search for and open 'Anaconda Prompt':

macOS

Open Launchpad, then click the terminal icon.

Linux

Open a terminal window.

Start Python¶

At Anaconda Prompt (terminal on Linux or macOS), type pythonand press Enter.

The >>> means you are in Python.

Write a Python program¶

At the >>>, type print('HelloAnaconda!') and press Enter.

When you press enter, your program runs. The words 'Hello Anaconda!' print tothe screen. You're programming in Python!

Exit Python¶

On Windows, press CTRL-Z and press Enter. On macOS or Linux typeexit() and press Enter.

Optional: Launch Spyder or Jupyter Notebook from the command line¶

  1. At the Anaconda Prompt (terminal on Linux or macOS), type spyderand press Enter.Spyder should start up just like it did when you launched itfrom Anaconda Navigator.
  2. Close Spyder the same way you did in the previous exercise.
  3. At the Anaconda Prompt (terminal on Linux or macOS), typejupyter-notebook and press Enter.

Jupyter Notebook should start up just like it did when you launchedit from Anaconda Navigator. Close it the same way you did in theprevious exercise.

What's next?¶

Using Navigator¶

Using conda¶

Python
  1. From Jupyter Notebooks top menu bar, select File - Close and Halt.
  2. Click the Quit button at the upper right of the Notebook Dashboardand close the window or tab.

Close Navigator¶

From Navigator's top menu bar, select Anaconda Navigator - QuitAnaconda-Navigator.

Write a Python program using Anaconda Prompt or terminal¶

Open Anaconda Prompt¶

Choose the instructions for your operating system.

  • Windows.
  • macOS.
  • Linux.

Windows

From the Start menu, search for and open 'Anaconda Prompt':

macOS

Open Launchpad, then click the terminal icon.

Linux

Open a terminal window.

Start Python¶

At Anaconda Prompt (terminal on Linux or macOS), type pythonand press Enter.

The >>> means you are in Python.

Write a Python program¶

At the >>>, type print('HelloAnaconda!') and press Enter.

When you press enter, your program runs. The words 'Hello Anaconda!' print tothe screen. You're programming in Python!

Exit Python¶

On Windows, press CTRL-Z and press Enter. On macOS or Linux typeexit() and press Enter.

Optional: Launch Spyder or Jupyter Notebook from the command line¶

  1. At the Anaconda Prompt (terminal on Linux or macOS), type spyderand press Enter.Spyder should start up just like it did when you launched itfrom Anaconda Navigator.
  2. Close Spyder the same way you did in the previous exercise.
  3. At the Anaconda Prompt (terminal on Linux or macOS), typejupyter-notebook and press Enter.

Jupyter Notebook should start up just like it did when you launchedit from Anaconda Navigator. Close it the same way you did in theprevious exercise.

What's next?¶

Using Navigator¶

Using conda¶

Using Spyder¶

Using Jupyter Notebook¶

Links to IDE documentation¶





broken image