mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Install conda packages from conda-forge explicitly
I don't think the default channel fields in construct.yaml are working.
This commit is contained in:
@@ -30,13 +30,14 @@ def ensure_conda_env(prefix):
|
|||||||
|
|
||||||
def ensure_conda_packages(prefix, packages):
|
def ensure_conda_packages(prefix, packages):
|
||||||
"""
|
"""
|
||||||
Ensure packages are installed in the conda prefix.
|
Ensure packages (from conda-forge) are installed in the conda prefix.
|
||||||
"""
|
"""
|
||||||
abspath = os.path.abspath(prefix)
|
abspath = os.path.abspath(prefix)
|
||||||
# Let subprocess errors propagate
|
# Let subprocess errors propagate
|
||||||
# FIXME: raise different exception when using
|
# FIXME: raise different exception when using
|
||||||
raw_output = subprocess.check_output(CONDA_EXECUTABLE + [
|
raw_output = subprocess.check_output(CONDA_EXECUTABLE + [
|
||||||
'install',
|
'install',
|
||||||
|
'-c', 'conda-forge', # Make customizable if we ever need to
|
||||||
'--json',
|
'--json',
|
||||||
'--prefix', abspath
|
'--prefix', abspath
|
||||||
] + packages).decode()
|
] + packages).decode()
|
||||||
|
|||||||
Reference in New Issue
Block a user