This getting started guide walks you through using Anaconda Project for the first time.
After completing this guide, you will be able to:
- Create a project containing a Bokeh app.
- Run the project with a single command.
- Package and share the project.
If you have not yet installed and started Project, follow the Installation instructions.
For more information on Bokeh, see Welcome to Bokeh.
Creating a project containing a Bokeh app¶
To create a project called “clustering_app”:
Open a Command Prompt or terminal window.
Create a directory called
clustering_app, switch to it and then initialize the project:
$ mkdir clustering_app $ cd clustering_app $ anaconda-project init Project configuration is in /User/Anaconda/My Anaconda Projects/clustering_app/anaconda-project.yml
clustering_appproject directory, create and save a file named
main.pythat contains the code from the Bokeh clustering example.
Add the packages that the Bokeh clustering demo depends on:
anaconda-project add-packages python=3.5 bokeh=0.12.4 numpy=1.12.0 scikit-learn=0.18.1
Tell Project about the Bokeh app:
anaconda-project add-command plot .
NOTE: By default, Bokeh looks for the file
main.py, so you do not need to include this in the command string after the “plot” command name.
When prompted, type
Bfor Bokeh app:
Is `plot` a (B)okeh app, (N)otebook, or (C)ommand line? B Added a command 'plot' to the project. Run it with `anaconda-project run plot`.
Run your new project:
NOTE: If your project included more than one command, you would need to specify which command to run. For more information, see Running a project.
A browser window opens, displaying the clustering app.
Running your project¶
Anyone with Project—your colleague or someone who downloads your project from Cloud—can run your project by unzipping the project archive file and then running a single command, without having to do any setup:
NOTE: If your project contained more than one command, the person using your project would need to specify which command to run. For more information, see Running a project.
Project downloads the data, installs the necessary packages and runs the command.