Skip to content

Commit 976729e

Browse files
authored
Merge pull request #95 from andrewdelman/ecco_access_updates
corrected setup instructions in ecco_access intro tutorial
2 parents b9bc354 + 077df9f commit 976729e

1 file changed

Lines changed: 16 additions & 9 deletions

File tree

ecco_access/ecco_access_tutorials/ECCO_access_intro.ipynb

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"source": [
88
"# The *ecco_access* Python \"package\": accessing ECCO output on PO.DAAC\n",
99
"\n",
10-
"Andrew Delman, updated 2024-10-15\n",
10+
"Andrew Delman, updated 2024-10-17\n",
1111
"\n",
1212
"[Introduction](https://ecco-v4-python-tutorial.readthedocs.io/ECCO_access_intro.html#Introduction)\\\n",
1313
"[Setting up *ecco_access*](https://ecco-v4-python-tutorial.readthedocs.io/ECCO_access_intro.html#Setting-up-ecco_access)\\\n",
@@ -39,24 +39,31 @@
3939
"- Download the *ecco_access* folder by clicking on [this link](https://download-directory.github.io/?url=https%3A%2F%2Fgithub.com%2FECCO-GROUP%2FECCO-v4-Python-Tutorial%2Ftree%2Fmaster%2Fecco_access).\n",
4040
"\n",
4141
"\n",
42-
"If you downloaded the folder (second option), make sure the downloaded folder is unzipped/extracted and rename it to `ecco_access`. Then you need to make it accessible to your notebook, either by: \n",
42+
"If you downloaded the folder (second option), make sure the downloaded folder is unzipped/extracted and rename it to `ecco_access`. \n",
4343
"\n",
44-
"### Moving the folder to a directory in your Python path\n",
44+
"Then you need to make it accessible to your notebook, either by: \n",
45+
"\n",
46+
"### Adding the `ecco_access` parent directory to your Python path\n",
47+
"\n",
48+
"The `ecco_access` parent directory is the directory containing `ecco_access`. Add it to your Python path with the following Python code in each notebook where `ecco_access` is used:\n",
4549
"\n",
4650
"```\n",
4751
"import sys\n",
48-
"print(sys.path)\n",
49-
"\n",
50-
"['', '/srv/conda/envs/notebook/lib/python311.zip', '/srv/conda/envs/notebook/lib/python3.11',\n",
51-
" '/srv/conda/envs/notebook/lib/python3.11/lib-dynload', '/srv/conda/envs/notebook/lib/python3.11/site-packages']\n",
52+
"sys.path.append({parent_dir})\n",
5253
"```\n",
5354
"\n",
54-
"In this example, `ecco_access` could be moved to the `/srv/conda/envs/notebook/lib/python3.11/site-packages/` directory in your Python path. \n",
55-
"\n",
5655
"Or:\n",
5756
"\n",
5857
"### Put in a symlink to the `ecco_access` location from your current notebook directory.\n",
5958
"\n",
59+
"A symlink (or soft link) from the directory containing your notebooks will allow you to use the `ecco_access` libraries from any notebook in that directory. Put in the link with the following code in your terminal window:\n",
60+
"\n",
61+
"```\n",
62+
"ln -s {parent_dir}/ecco_access {current_notebook_dir}/ecco_access\n",
63+
"```\n",
64+
"\n",
65+
"or by running the following Python code once:\n",
66+
"\n",
6067
"```\n",
6168
"import os\n",
6269
"os.symlink('{location_of_ecco_access}/ecco_access','{current_notebook_dir}/ecco_access',target_is_directory=True)\n",

0 commit comments

Comments
 (0)