... | ... | @@ -59,7 +59,7 @@ While we have already seen that some tools can write their own files indicating |
|
|
|
|
|
- `requirements.txt` is a file for describing dependencies, and can be used with all the tools listed above.
|
|
|
- `environment.yml` is used by tools based on `conda` packages.
|
|
|
It also allows to choose the python version and the channels you want to fetch your depencies.
|
|
|
It also allows to choose the python version and the channels you want to fetch your dependencies.
|
|
|
|
|
|
### `requirements.txt` example
|
|
|
|
... | ... | @@ -72,7 +72,7 @@ jupyterlab |
|
|
requests[security]
|
|
|
```
|
|
|
|
|
|
With version specifier and environment marker, you can be more precise.
|
|
|
With [version specifier](https://packaging.python.org/en/latest/specifications/version-specifiers/#id5) and environment marker, you can be more precise.
|
|
|
|
|
|
```txt
|
|
|
numpy>1.20
|
... | ... | @@ -83,6 +83,8 @@ requests [security] >= 2.8.1, == 2.8.* ; python_version < "2.7" |
|
|
|
|
|
### `environment.yml` example
|
|
|
|
|
|
See more information on requirements specifiers on https://pip.pypa.io/en/stable/reference/requirement-specifiers/
|
|
|
|
|
|
Without version specifier
|
|
|
|
|
|
```yaml
|
... | ... | |