diff --git a/HISTORY.rst b/HISTORY.rst
index a808c8c..796bf32 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -2,6 +2,15 @@
 History
 =======
 
+
+0.9.3 (2017-04-10)
+------------------
+
+* ``conda-devenv`` no longer requires ``conda`` to be on ``PATH`` to work (`#45`_).
+
+.. _`#45`: https://github.com/ESSS/conda-devenv/issues/45
+
+
 0.9.2 (2017-03-27)
 ------------------
 
diff --git a/conda_devenv/devenv.py b/conda_devenv/devenv.py
index 356c4f1..66b6bf9 100644
--- a/conda_devenv/devenv.py
+++ b/conda_devenv/devenv.py
@@ -247,7 +247,7 @@ def __write_conda_environment_file(args, filename, rendered_contents):
 
 
 def __call_conda_env_update(args, output_filename):
-    import subprocess
+    import sys
     command = [
         "conda",
         "env",
@@ -265,7 +265,23 @@ def __call_conda_env_update(args, output_filename):
     if not args.quiet:
         print("> Executing: %s" % ' '.join(command))
 
-    return subprocess.call(command)
+    old_argv = sys.argv[:]
+    try:
+        del command[0]
+        sys.argv = command
+        return _call_conda()
+    finally:
+        sys.argv = old_argv
+
+
+def _call_conda():
+    """
+    Calls conda-env directly using its internal API. ``sys.argv`` must already be configured at this point.
+
+    We have this indirection here so we can mock this function during testing.
+    """
+    from conda_env.cli.main import main
+    return main()
 
 
 def write_activate_deactivate_scripts(args, conda_yaml_dict, environment):

devenv command fails if conda is not on path
I was just updating an env in a linux machine with `/full/path/to/conda devenv -f environment.devenv.yml` and got this traceback:
```
Traceback (most recent call last):
  File "/home/company/Work/miniconda/bin/conda-devenv", line 11, in <module>
    load_entry_point('conda-devenv==0.9.0', 'console_scripts', 'conda-devenv')()
  File "/home/company/Work/miniconda/lib/python2.7/site-packages/conda_devenv/devenv.py", line 356, in main
    retcode = __call_conda_env_update(args, output_filename)
  File "/home/company/Work/miniconda/lib/python2.7/site-packages/conda_devenv/devenv.py", line 268, in __call_conda_env_update
    return subprocess.call(command)
  File "/home/company/Work/miniconda/lib/python2.7/subprocess.py", line 168, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/home/company/Work/miniconda/lib/python2.7/subprocess.py", line 390, in _init_
    errread, errwrite)
  File "/home/company/Work/miniconda/lib/python2.7/subprocess.py", line 1024, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
```
After some time investigating I found out it was because I didn't have conda on PATH. I think it should either not require it to be on path (using absolute path instead) or give a better error message.

diff --git a/tests/test_main.py b/tests/test_main.py
index cc20b26..3fd56e2 100644
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -1,5 +1,6 @@
 from __future__ import absolute_import, division, print_function, unicode_literals
 
+import sys
 import textwrap
 
 import pytest
@@ -12,8 +13,7 @@ def patch_conda_calls(mocker):
     Patches all necessary functions so that we can do integration testing without actually calling
     conda.
     """
-    import subprocess
-    mocker.patch.object(subprocess, 'call', autospec=True, return_value=0)
+    mocker.patch.object(devenv, '_call_conda', autospec=True, return_value=0)
     mocker.patch.object(devenv, 'write_activate_deactivate_scripts', autospec=True)
 
 
@@ -22,11 +22,17 @@ def patch_conda_calls(mocker):
     ('environment.yml', 'environment.yml'),
 ])
 @pytest.mark.usefixtures('patch_conda_calls')
-def test_handle_input_file(tmpdir, patch_conda_calls, input_name, expected_output_name):
+def test_handle_input_file(tmpdir, input_name, expected_output_name):
     """
     Test how conda-devenv handles input files: devenv.yml and pure .yml files.
     """
-    import subprocess
+    argv = []
+    def call_conda_mock():
+        argv[:] = sys.argv[:]
+        return 0
+
+    devenv._call_conda.side_effect = call_conda_mock
+    
     filename = tmpdir.join(input_name)
     filename.write(textwrap.dedent('''\
         name: a
@@ -34,10 +40,9 @@ def test_handle_input_file(tmpdir, patch_conda_calls, input_name, expected_outpu
           - a_dependency
     '''))
     assert devenv.main(['--file', str(filename), '--quiet']) == 0
-    assert subprocess.call.call_count == 1
-    args, kwargs = subprocess.call.call_args
-    cmdline = 'conda env update --file {} --prune --quiet'.format(tmpdir.join(expected_output_name))
-    assert args == (cmdline.split(),)
+    assert devenv._call_conda.call_count == 1
+    cmdline = 'env update --file {} --prune --quiet'.format(tmpdir.join(expected_output_name))
+    assert argv == cmdline.split()
 
 
 @pytest.mark.parametrize('input_name', ['environment.devenv.yml', 'environment.yml'])

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-datadir
3.6
requirements_dev.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.13
attrs==22.2.0
Babel==2.11.0
bump2version==1.0.1
bumpversion==0.6.0
certifi==2021.5.30
cffi==1.15.1
charset-normalizer==2.0.12
-e git+https://github.com/ESSS/conda-devenv.git@f23bec79139cbb9e59e4e2bdafb27385afcee192#egg=conda_devenv
coverage==6.2
cryptography==40.0.2
distlib==0.3.9
docutils==0.17.1
filelock==3.4.1
flake8==5.0.4
idna==3.10
imagesize==1.4.1
importlib-metadata==4.2.0
importlib-resources==5.4.0
iniconfig==1.1.1
Jinja2==3.0.3
MarkupSafe==2.0.1
mccabe==0.7.0
packaging==21.3
platformdirs==2.4.0
pluggy==1.0.0
py==1.11.0
pycodestyle==2.9.1
pycparser==2.21
pyflakes==2.5.0
Pygments==2.14.0
pyparsing==3.1.4
pytest==7.0.1
pytest-datadir==1.4.1
pytest-mock==3.6.1
pytz==2025.2
PyYAML==6.0.1
requests==2.27.1
six==1.17.0
snowballstemmer==2.2.0
Sphinx==4.3.2
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
toml==0.10.2
tomli==1.2.3
tox==3.28.0
typing_extensions==4.1.1
urllib3==1.26.20
virtualenv==20.16.2
watchdog==2.3.1
zipp==3.6.0

name: conda-devenv
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alabaster==0.7.13
      - attrs==22.2.0
      - babel==2.11.0
      - bump2version==1.0.1
      - bumpversion==0.6.0
      - cffi==1.15.1
      - charset-normalizer==2.0.12
      - coverage==6.2
      - cryptography==40.0.2
      - distlib==0.3.9
      - docutils==0.17.1
      - filelock==3.4.1
      - flake8==5.0.4
      - idna==3.10
      - imagesize==1.4.1
      - importlib-metadata==4.2.0
      - importlib-resources==5.4.0
      - iniconfig==1.1.1
      - jinja2==3.0.3
      - markupsafe==2.0.1
      - mccabe==0.7.0
      - packaging==21.3
      - platformdirs==2.4.0
      - pluggy==1.0.0
      - py==1.11.0
      - pycodestyle==2.9.1
      - pycparser==2.21
      - pyflakes==2.5.0
      - pygments==2.14.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - pytest-datadir==1.4.1
      - pytest-mock==3.6.1
      - pytz==2025.2
      - pyyaml==6.0.1
      - requests==2.27.1
      - six==1.17.0
      - snowballstemmer==2.2.0
      - sphinx==4.3.2
      - sphinxcontrib-applehelp==1.0.2
      - sphinxcontrib-devhelp==1.0.2
      - sphinxcontrib-htmlhelp==2.0.0
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==1.0.3
      - sphinxcontrib-serializinghtml==1.1.5
      - toml==0.10.2
      - tomli==1.2.3
      - tox==3.28.0
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - virtualenv==20.16.2
      - watchdog==2.3.1
      - zipp==3.6.0
prefix: /opt/conda/envs/conda-devenv

tests/test_main.py::test_handle_input_file[environment.yml-environment.yml] tests/test_main.py::test_print[environment.yml]
tests/test_main.py::test_handle_input_file[environment.devenv.yml-environment.yml] tests/test_main.py::test_print[environment.devenv.yml] tests/test_main.py::test_print_full
HISTORY.rst conda_devenv/devenv.py
HISTORY.rst conda_devenv/devenv.py