Skip to content

Commit 628873c

Browse files
authored
use_isolated_environments.rst tips
1 parent 8b573c5 commit 628873c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

docs/day2/use_isolated_environments.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ With this tool you can download and install with ``pip`` from the `PyPI reposito
135135
- These are almost completely interchangeable
136136
- The difference being that **virtualenv supports older python versions** and has a few more minor unique features, while **venv is in the standard library**.
137137
- Step 1:
138-
- Virtualenv: ``virtualenv --system-site-packages Example``
139-
- venv: ``python -m venv --system-site-packages Example2``
138+
- Virtualenv: ``virtualenv Example``
139+
- venv: ``python -m venv Example2``
140140
- Next steps are identical and involves "activating" and ``pip install``
141141
- We recommend ``venv`` in the course. Then we are just needing the Python module itself!
142142

@@ -175,9 +175,14 @@ With this tool you can download and install with ``pip`` from the `PyPI reposito
175175
.. note::
176176

177177
- 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 moduels yopu have loaded
178+
- Some packages may be inhereted from the modules you have loaded
179179
- You can do ``pip list --local`` to see what is installed by you in the environment.
180180
- Some IDE:s like Spyder may only find those "local" packages
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!
182+
- ``--system-site-packages`` includes the packages already installed in the loaded python module.
183+
- The ``--no-cache-dir"`` option is required to **avoid it from reusing earlier installations from the same user in a different environment**.
184+
- The ``--no-build-isolation`` is to make sure that it uses the loaded modules from the module system when **building any Cython libraries**.
185+
181186

182187
Conda
183188
-----

0 commit comments

Comments
 (0)