kopia lustrzana https://github.com/jupyterhub/repo2docker
conda's not Python specific
rodzic
b20ee4adb9
commit
123900fdbb
|
@ -1,12 +1,12 @@
|
||||||
Python - Mixed Requirements
|
Conda - Mixed Requirements
|
||||||
---------------------------
|
--------------------------
|
||||||
|
|
||||||
An ``environment.yml`` takes precedence over ``requirements.txt``.
|
An ``environment.yml`` takes precedence over ``requirements.txt``.
|
||||||
To install files into a conda environment with pip, use the ``pip`` key in ``environment.yml``:
|
To install Python packages into a conda environment with pip, use the ``pip`` key in ``environment.yml``:
|
||||||
|
|
||||||
.. sourcecode:: yaml
|
.. sourcecode:: yaml
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- numpy
|
- numpy
|
||||||
- pip:
|
- pip:
|
||||||
- tornado
|
- tornado
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
assert sys.version_info[:2] == (3, 6)
|
assert sys.version_info[:2] == (3, 6), sys.version
|
||||||
|
|
||||||
import numpy
|
import numpy
|
||||||
try:
|
try:
|
||||||
import there
|
import there
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print('ok')
|
pass
|
||||||
else:
|
else:
|
||||||
raise Exception("'there' shouldn't have been installed from requirements.txt")
|
raise Exception("'there' shouldn't have been installed from requirements.txt")
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Python - Conda Environment
|
Conda Environment
|
||||||
--------------------------
|
-----------------
|
||||||
|
|
||||||
Conda environments files may allow for more complex builds and dependencies. You
|
Conda environments files may allow for more complex builds and dependencies. You
|
||||||
can specify them in the standard YAML structure.
|
can specify them in the standard `environment.yml` files.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
assert sys.version_info[:2] == (3, 6)
|
assert sys.version_info[:2] == (3, 6), sys.version
|
||||||
|
|
||||||
import numpy
|
import numpy
|
||||||
|
|
Ładowanie…
Reference in New Issue