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
If we have a look at our script, we may notice a few `import` lines like the following:
34
34
35
35
```python
@@ -81,14 +81,14 @@ allowing isolation from other software projects on your machine that may require
81
81
different versions of Python or external libraries.
82
82
83
83
It is recommended to create a separate virtual environment for each project.
84
-
Then you do not have to worry about changes to the environment of the current project you are working on
84
+
Then you do not have to worry about changes to the environment of the current project you are working on
85
85
affecting other projects - you can use different Python versions and different versions of the same third party
86
86
dependency by different projects on your machine independently from one another.
87
87
88
88
We can visualise the use of virtual environments for different Python projects on the same machine as follows:
89
89
{alt='Diagram to depict different Python environments containing different packages on the same machine'}
90
90
91
-
Another big motivator for using virtual environments is that they make sharing your code with others much easier -
91
+
Another big motivator for using virtual environments is that they make sharing your code with others much easier -
92
92
as we will see shortly you can record your virtual environment in a special file and share it with your collaborators
93
93
who can then recreate the same development environment on their machines.
94
94
@@ -100,7 +100,7 @@ They also enable you to use a specific older version of a package for your proje
100
100
101
101
## Managing virtual environments
102
102
103
-
There are several command line tools used for managing Python virtual environments - we will use `venv`,
103
+
There are several command line tools used for managing Python virtual environments - we will use `venv`,
104
104
available by default from the standard `Python` distribution since `Python 3.3`.
105
105
106
106
Part of managing your (virtual) working environment involves
@@ -212,11 +212,11 @@ we will see how to handle it using Git in one of the subsequent episodes.
212
212
### Installing external packages
213
213
214
214
We noticed earlier that our code depends on four **external packages/libraries** -
215
-
`json`, `csv`, `datetime` and `matplotlib`.
216
-
As of Python 3.5, Python comes with in-built JSON and CSV libraries - this means there is no need to install these
217
-
additional packages (if you are using a fairly recent version of Python), but you still need to import them in any
218
-
script that uses them.
219
-
However, we still need to install packages `datetime` and `matplotlib` as they do not come as standard with
215
+
`json`, `csv`, `datetime` and `matplotlib`.
216
+
As of Python 3.5, Python comes with in-built JSON and CSV libraries - this means there is no need to install these
217
+
additional packages (if you are using a fairly recent version of Python), but you still need to import them in any
218
+
script that uses them.
219
+
However, we still need to install packages `datetime` and `matplotlib` as they do not come as standard with
220
220
Python distribution.
221
221
222
222
To install the latest version of packages `datetime` and `matplotlib` with `pip`
@@ -233,7 +233,7 @@ or like this to install multiple packages at once for short:
0 commit comments