utils
_init_venv_v1(*, path, python_version=None, logger_name)
async
¶
Set a virtual environment at path/venv
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
Path path to directory in which to set up the virtual environment |
required | |
python_version |
default=None Python version the virtual environment will be based upon |
None
|
Returns:
Name | Type | Description |
---|---|---|
python_bin |
Path
|
Path path to python interpreter |
Source code in fractal_server/tasks/v1/utils.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
|
get_python_interpreter_v1(version=None)
¶
Return the path to the python interpreter
Parameters:
Name | Type | Description | Default |
---|---|---|---|
version |
Optional[str]
|
Python version |
None
|
Raises:
Type | Description |
---|---|
ValueError
|
If the python version requested is not available on the host. |
Returns:
Name | Type | Description |
---|---|---|
interpreter |
str
|
string representing the python executable or its path |
Source code in fractal_server/tasks/v1/utils.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|