-
Notifications
You must be signed in to change notification settings - Fork 29
Home
The recipes here create conda packages useful to the IOOS community. These packages are shared with the community at Binstar.org.
For IOOS python users, we recommend the Anaconda Scientific Python Distribution as the easiest way to get all the custom packages needed to run the IOOS system tests.
-
Grab this example notebook and this example notebook by opening the link, and then clicking the download button in the upper right to save the notebook to your computer.
-
If you don't have the Anaconda launcher installed, type
conda install launcher
to install it. -
Click on the launcher icon to start the launcher application, or just type 'launcher'.
-
From the Launcher, make sure that the
ioos
environment is selected, and then click thelaunch"
button to the right of theipython-notebook
app. If you don't see thelaunch
button, you need to click oninstall
to install the app. -
Once the Notebook is launched, you should see a list of directories and files, and near the top, instructions for importing a notebook. Note that the
Ipython Notebook
has now changed it's name toJupyter
. -
Import the downloaded notebooks (I prefer to drag the downloaded notebook onto the Notebook list).
-
In the Notebook, click on
Cell=>All Output=>Clear
to clear the existing output, and thenCell=>Run all
to see if the output is recreated.
-
if the IOOS environment is selected in the launcher, all applications you launch from there will have the IOOS environment. On a linux or mac terminal window, you can activate the
ioos
environment by typingsource activate ioos
and deactivate it by typingsource deactivate
. On windows, you can open an Anaconda command prompt (in the Anaconda programs folder) and typeactivate ioos
to activate the ioos environment, or typedeactivate
to deactivate. -
If you want to always have the notebook server start in the same location, you can go to the anaconda command prompt and type
ipython profile create
to create a default ipython notebook configuration file. You can then typeipython locate profile default
to find out the directory where the configuration file was created. Go to this directory and edit the fileipython_notebook_config.py
, setting the value ofc.NotebookApp.notebook_dir
.
On my system my line looks like this:
c.NotebookApp.notebook_dir = u'C:\\users\\rsignell\\documents\\github\\notebook'
- If you want to track your notebooks on github, you might want to set up the notebook server to create regular
.py
python versions of your notebooks (in addition to the.ipynb
format that gets saved by default). The instructions for this are here: http://stackoverflow.com/a/25765194/2005869
Anaconda users can just conda install
, which installs not only binary packages for their platform, but the binary libraries they depend on. So it's easier than pip install
and, thanks to binary relocation, more powerful than python wheels. System-level installation of libraries and admin
privileges are not required. Check out
Travis Oliphant's blog piece for more info.
The recipes here are automatically built using Travis-CI with the assistance of Obvious-CI.
Some bugs, like hard-coded paths, might surface when using these packages. If you encounter one, raise an issue.
Some bullets points:
- The numpy version is controlled by the environment variable
CONDA_NPY
(e.g.:export CONDA_NPY=18
). - The python version is controlled by the environment variable
CONDA_PY
(e.g.:export CONDA_PY=27
). - When rebuilding something with the same version we need to increment the build number in the meta.yaml. That will ensure the installation of the new version, rather than just what is sitting around in their cache.
- To avoid the package cache we can add a -f to the install to force downloading, like:
conda install iris -f
- There is no need for subdirs like np18py27.
-
conda build iris
will automatically build all the other dependencies (biggus, pyke, cartopy) if it finds a recipe for the requirement at the same directory level. - That is a strong incentive to set:
conda config --set binstar_upload yes
and have all packages uploaded with one "build".