MCPcopy Create free account
hub / github.com/ipython/ipython / _is_conda_environment

Function _is_conda_environment

IPython/core/magics/packaging.py:19–23  ·  view source on GitHub ↗

Return True if the current Python executable is in a conda env

()

Source from the content-addressed store, hash-verified

17
18
19def _is_conda_environment():
20 """Return True if the current Python executable is in a conda env"""
21 # TODO: does this need to change on windows?
22 conda_history = os.path.join(sys.prefix, 'conda-meta', 'history')
23 return os.path.exists(conda_history)
24
25
26def _get_conda_executable():

Callers 1

condaMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected