Skip to content

Commit 3c5e950

Browse files
committed
Update documentation
1 parent 9e1dabb commit 3c5e950

File tree

5 files changed

+104
-47
lines changed

5 files changed

+104
-47
lines changed

_sources/notebooks/chapter_00/chap_00_notebook.ipynb

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,17 @@
9090
"\n",
9191
"From here, you can install various libraries using either of the below commands where `<library>` is the name of the library to install.\n",
9292
"\n",
93-
"`pip install <library>`\n",
93+
" pip install <library>\n",
9494
"\n",
9595
"or\n",
9696
"\n",
97-
"`conda install <library>`\n",
97+
" conda install <library>\n",
9898
"\n",
9999
"Most libraries can be installed using either of the above commands, but a few can only be installed with one. You should do a quick internet search to see which is the preferred method for a particular library before installing it. The `pip list` or `conda list` command will display a list of all libraries currently installed with version numbers. To perform an update, the following two commands may be used for many libraries. Again, check to see which is preferred for a particular library.\n",
100100
"\n",
101-
"`pip install <library> --upgrade`\n",
101+
" pip install <library> --upgrade\n",
102102
"\n",
103-
"`conda update <library>`\n",
103+
" conda update <library>\n",
104104
"\n",
105105
"#### Miniconda (preferred)\n",
106106
"\n",
@@ -119,12 +119,15 @@
119119
" - seaborn\n",
120120
" - sympy\n",
121121
"\n",
122-
"For example, to install numpy using pip, you would run the following command in your Terminal or in the JupyterLab Terminal.\n",
122+
"For example, to install numpy using pip, you would run the following command in your computer's Terminal or in the JupyterLab Terminal (Figure 2).\n",
123123
"\n",
124-
"`pip install numpy`\n",
124+
" pip install numpy\n",
125125
"\n",
126126
"```{tip}\n",
127-
"If you want a shortcut, a text file containing a list of all the packages, one per line, can be created called `packages.txt` and run using the `pip install -r packages.txt` command. If the command is not finding the file, try typing the first part through `pip install -r ` and then click and drag the `packages.txt` file into the Terminal window.\n",
127+
"If you want a shortcut, a text file containing a list of all the packages, one per line, can be created called `packages.txt` and run using the command below. If the command is not finding the file, try typing the first part through `pip install -r ` and then click and drag the `packages.txt` file into the Terminal window.\n",
128+
"\n",
129+
" pip install -r packages.txt\n",
130+
"\n",
128131
"```\n",
129132
"\n",
130133
"To launch JupyterLab and start coding, type `jupyter-lab` in the Terminal window. It should launch in your browser (e.g., Chrome or Firefox). JupyterLab is **not a website**; it just uses your web browser as a file viewer.\n",
@@ -134,17 +137,33 @@
134137
"The topic of environments is technically an optional one. If you are just getting started, you can skip over this for now, but as you establish yourself more in coding and work on more projects, it is a good idea to learn to use environments. Using environments is considered best practices and allows you to have multiple different versions of Python and/or Python packages installed on a single computer at the same time. This is helpful when you are working on multiple very different projects. There are two common types of environment you will often hear about - conda and venv. We address using conda environments here. Again, if you are just getting started, this may not be necessary, but here are instructions for doing this when the time comes. \n",
135138
"\n",
136139
"1. Open the Terminal on your computer or in JupyterLab and type **one** of the following commands to create a new conda environment with the name <env_name>. The <env_name> can be anything you want. The `python` tells the command to also install Python in that environment. Optionally, you can also list Python packages to install in the environment at this stage by listing them like is done in the second command example.\n",
137-
" `conda create --name <env_name> python`\n",
138-
" `conda create --name <env_name> python numpy scipy matplotlib`\n",
139-
"3. Now the new conda environment has been created. To see a list of all your environments, type `conda env list`. You should always have one called `base` along with any others you created.\n",
140-
"4. Next, we need to switch over to the new environment by typing `conda activate <env_name>`. If you again type `conda env list`, you will see the `*` has shifted from `base` to your new environment indicating that the new environment is currently active.\n",
141-
"5. If you want to install additional libraries in this environment, you can do this now using `conda` or `pip`. Remember to install JupyterLab if you intend to use it.\n",
142-
"6. If you want to use this environment in a Jupyter notebook, you will need register it with JupyterLab. First install ipykernel (e.g., `conda install ipykernel`) and then type `ipython kernel install --user --name=<env_name>` to register your environment with JupyterLab. Now when you start a new Jupyter notebook, your new environment will be an option. There will also be a pull-down menu on the top right of your notebook where you can select which environment you want to use.\n",
140+
" \n",
141+
" conda create --name <env_name> python\n",
142+
" \n",
143+
" conda create --name <env_name> python numpy scipy matplotlib\n",
144+
" \n",
145+
"3. Now the new conda environment has been created. To see a list of all your environments, type the following. You should always have one called `base` along with any others you created.\n",
146+
"\n",
147+
" conda env list\n",
148+
" \n",
149+
"5. Next, we need to switch over to the new environment by typing the activate commend below. If you again type `conda env list`, you will see the `*` has shifted from `base` to your new environment indicating that your new environment is currently active.\n",
150+
"\n",
151+
" conda activate <env_name>\n",
152+
"\n",
153+
"6. If you want to install additional libraries in this environment, you can do this now using `conda` or `pip`. Remember to install JupyterLab if you intend to use it.\n",
154+
"7. If you want to use this environment in a Jupyter notebook, you will need register it with JupyterLab. First install ipykernel (e.g., `conda install ipykernel`) and then type the command below to register your environment with JupyterLab. Now when you start a new Jupyter notebook, your new environment will be an option. There will also be a pull-down menu on the top right of your notebook where you can select which environment you want to use.\n",
155+
"\n",
156+
" ipython kernel install --user --name=<env_name>\n",
143157
"\n",
144158
"To remove an old environment you don't need anymore, do the following.\n",
145159
"1. Deactivate the old environment by switching to some other environment like `base`. For example, `conda activate base`.\n",
146-
"2. If you registered the environment with Jupyter, unregister it with `jupyter kernelspec uninstall <env_name>`.\n",
147-
"3. Remove the environment using `conda env remove --name <env_name>`."
160+
"2. If you registered the environment with Jupyter, unregister it with the following.\n",
161+
"\n",
162+
" jupyter kernelspec uninstall <env_name>\n",
163+
"\n",
164+
"3. Remove the environment using the `remove` command.\n",
165+
" \n",
166+
" conda env remove --name <env_name>"
148167
]
149168
},
150169
{
@@ -181,7 +200,7 @@
181200
"\n",
182201
"Most of the libraries (see [section 0.6](0.6)) used in this book are already available in Google Colab by default including NumPy, SciPy, pandas, seaborn, scikit-image, and scikit-learn. If you need any additional libraries (or \"packages\"), you can usually install them by adding a code cell at the top of your Jupyter notebooks that looks like the following inserting the library name for `<library>`. If you need any additional libraries installed for this book, this will be addressed in the appropriate chapter.\n",
183202
"\n",
184-
"`!pip install <library>`"
203+
" !pip install <library>"
185204
]
186205
},
187206
{

_sources/notebooks/introduction/intro.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,13 @@ While great efforts have gone into ensuring that all the code in this book works
6868
The code in this version of the book has been most recently tested with the following software versions unless otherwise noted but will likely work with other versions.
6969

7070
- Python – 3.12.7
71-
- Jupyterlab - 4.4.4
71+
- JupyterLab - 4.4.4
7272
- NumPy – 2.2.6
7373
- SciPy – 1.16.0
7474
- Pandas – 2.3.0
7575
- Matplotlib – 3.10.3
7676
- Seaborn – 0.13.2
77+
- Altair - 5.5.0
7778
- Scikit-image – 0.25.2
7879
- Scikit-learn – 1.7.0
7980
- Sympy - 1.14.0
@@ -83,11 +84,10 @@ The code in this version of the book has been most recently tested with the foll
8384
- Biopython - 1.85
8485
- Nglview - 3.1.2
8586
- RDKit - 2025.3.3
86-
- pybaselines - 1.2.0
87-
- requests - 2.32.4
88-
- ipywidgets - 8.1.7
89-
- uncertainties - 3.2.3
90-
- Altair - 5.5.0
87+
- Pybaselines - 1.2.0
88+
- Requests - 2.32.4
89+
- IPywidgets - 8.1.7
90+
- Uncertainties - 3.2.3
9191

9292

9393
## Acknowledgments

0 commit comments

Comments
 (0)