You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/day2/use_isolated_environments.rst
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ Isolated environments
31
31
32
32
- Another example is when a reviewer want you to remake a figure.
33
33
- You have already started to use a newer Python version or newer packages and
34
-
- realise that your earlier script does not work anymore.
34
+
- realize that your earlier script does not work anymore.
35
35
- Having freezed the environment would have solved you from this issue!
36
36
37
37
.. note::
@@ -59,12 +59,12 @@ What happens at activation?
59
59
- Check with ``which python``, should show at path to the environment.
60
60
- In conda you can define python version as well
61
61
- Since ``venv`` is part of Python you will get the python version used when running the ``venv`` command.
62
-
- Packages are defined by the environent.
62
+
- Packages are defined by the environment.
63
63
- Check with ``pip list``
64
64
- Conda can only see what you installed for it.
65
65
- ``venv`` and ``virtualenv`` also see other packages if you allowed for that when creating the environment (``--system-site-packages``).
66
66
- You can work in a Python shell or IDE (coming session)
67
-
- You can run scripts dependent on packages now instaleld in your environment.
67
+
- You can run scripts dependent on packages now installed in your environment.
68
68
69
69
.. warning::
70
70
@@ -143,7 +143,7 @@ With this tool you can download and install with ``pip`` from the `PyPI reposito
143
143
.. admonition:: Tip for Tetralith
144
144
145
145
- load a "bare" python, like ``Python/3.10.4-bare-hpc1-gcc-2022a-eb``
146
-
- in en environment install setuptools and weel: ``pip3 install --upgrade pip setuptools wheel``
146
+
- in en environment install setuptools and wheel: ``pip3 install --upgrade pip setuptools wheel``
147
147
148
148
.. admonition:: Example NSC
149
149
@@ -166,7 +166,7 @@ With this tool you can download and install with ``pip`` from the `PyPI reposito
166
166
167
167
>>>import matplotlib
168
168
169
-
- When work is done, decativate the environment with
169
+
- When work is done, deactivate the environment with
170
170
171
171
.. code-block:: console
172
172
@@ -175,7 +175,7 @@ With this tool you can download and install with ``pip`` from the `PyPI reposito
175
175
.. note::
176
176
177
177
- You can use "pip list" on the command line (after loading the python module) to see which packages are available and which versions.
178
-
- Some packages may be inhereted from the modules you have loaded
178
+
- Some packages may be inherited from the modules you have loaded
179
179
- You can do ``pip list --local`` to see what is installed by you in the environment.
180
180
- Some IDE:s like Spyder may only find those "local" packages
181
181
- To save space, you should load any other Python modules you will need that are system installed before installing your own packages! Remember to choose ones that are compatible with the Python version you picked!
@@ -201,7 +201,7 @@ Conda
201
201
- conda-forge
202
202
- dranew
203
203
- free
204
-
- ~main~ # not avalible at the HPC-clusters
204
+
- ~main~ # not available at the HPC-clusters
205
205
- pro
206
206
- qiime2
207
207
- r
@@ -216,20 +216,20 @@ Conda
216
216
Drawbacks
217
217
218
218
- Conda cannot use already install packages from the Python modules and libraries already installed, and hence installs them anyway
219
-
- Conda is therefore known for creating **many** *small* files. Your diskspace is not only limited in GB, but also in number of files (typically ``300000`` in $HOME).
219
+
- Conda is therefore known for creating **many** *small* files. Your disk space is not only limited in GB, but also in number of files (typically ``300000`` in $HOME).
220
220
- Check your disk usage and quota limit
221
221
- Do a ``conda clean -a`` once in a while to remove unused and unnecessary files
222
222
223
223
.. tip::
224
224
225
-
- The conda environemnts inclusing many small files are by default stored in ``~/.conda`` folder that is in your $HOME directory with limited storage.
225
+
- The conda environments including many small files are by default stored in ``~/.conda`` folder that is in your $HOME directory with limited storage.
226
226
- Move your ``.conda`` directory to your project folder and make a soft link to it from ``$HOME``
227
227
- Do the following (``mkdir -p`` ignores error output and will not recreate another folder if it already exists):
228
228
- (replace what is inside ``<>`` with relevant path)
229
229
230
230
- Solution 1
231
231
232
-
This works nicely if you have several projects. Then you can change these varables according to what you are currently working with.
232
+
This works nicely if you have several projects. Then you can change these variables according to what you are currently working with.
233
233
234
234
.. code-block:: bash
235
235
@@ -715,7 +715,7 @@ Breakout room according to grouping
715
715
716
716
(Example) $ deactivate
717
717
718
-
- Everytime you need the tools available in the virtual environment you activate it as above (after also loading the modules).
718
+
- Every time you need the tools available in the virtual environment you activate it as above (after also loading the modules).
0 commit comments