Skip to content

davos.implementations.ipython_common._check_conda_avail_helper broken for IPython<7.3 #53

@paxtonfitzpatrick

Description

@paxtonfitzpatrick

The _check_conda_avail_helper() function checks whether the conda executable is available and accessible from the Python interpreter by running conda list IPython. If successful, it returns the captured stdout from the command so the path to the active conda environment can be parsed from it.

The ipython_common implementation of this helper function runs the shell command via the %conda line magic (<ipython_shell>.run_line_magic()) as a workaround for #10. However, the %conda line magic wasn't implemented until IPython v7.3 (changelog), so the command will fail for older versions, which davos incorrectly interprets as the conda executable not being available.

I think the best (only?) way to deal with this is to simply reimplement IPython's approach to determining the kernel's conda environment, here.

Note: for now, the test for _check_conda_avail_helper in test_ipython_common.ipynb is restricted to IPython>=7.3 until this is resolved.

Metadata

Metadata

Labels

ColaboratoryIssues specifically affecting the Google Colab implementationJupyterIssues specifically affecting the Jupyter Notebook implementationbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions