diff --git a/conda_pack/core.py b/conda_pack/core.py
index 12478c2..c2b5655 100644
--- a/conda_pack/core.py
+++ b/conda_pack/core.py
@@ -659,6 +659,10 @@ def load_environment(prefix, unmanaged=True, on_missing_cache='warn'):
     if not os.path.exists(conda_meta):
         raise CondaPackException("Path %r is not a conda environment" % prefix)
 
+    # Check that it's not the root environment
+    if any(os.path.exists(os.path.join(prefix, d)) for d in ['pkgs', 'envs']):
+        raise CondaPackException("Cannot package root environment")
+
     # Find the environment site_packages (if any)
     site_packages = find_site_packages(prefix)
 

Properly handle root environment
The root environment is different than sub-environments in a couple key ways:

- The path contains extra directories like the package cache, `conda-bld` directory, etc...
- The environment contains conda itself, and may contain packages that depend on it (these are forbidden in sub-environments)

A few options for handling the root environment:
- Special case the handling to directories/files that shouldn't be packed, and packages that depend on conda
- Error nicely and tell the user to create a sub-environment

I'm not sure which would be more expected. The second is a lot easier to implement.
diff --git a/conda_pack/tests/test_core.py b/conda_pack/tests/test_core.py
index ccafe44..b2b7306 100644
--- a/conda_pack/tests/test_core.py
+++ b/conda_pack/tests/test_core.py
@@ -1,5 +1,6 @@
 from __future__ import absolute_import, print_function, division
 
+import json
 import os
 import subprocess
 import tarfile
@@ -62,6 +63,16 @@ def test_errors_editable_packages():
     assert "Editable packages found" in str(exc.value)
 
 
+def test_errors_root_environment():
+    info = subprocess.check_output("conda info --json", shell=True).decode()
+    root_prefix = json.loads(info)['root_prefix']
+
+    with pytest.raises(CondaPackException) as exc:
+        CondaEnv.from_prefix(root_prefix)
+
+    assert "Cannot package root environment" in str(exc.value)
+
+
 def test_env_properties(py36_env):
     assert py36_env.name == 'py36'
     assert py36_env.prefix == py36_path

pip install -e .
parse_log_pytest
pytest
pytest flake8
apt-get update apt-get install -y gcc
3.6
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work
certifi==2021.5.30
-e git+https://github.com/conda/conda-pack.git@4de05868865c3f8f5c592ee90fdff808cab44e36#egg=conda_pack
flake8==5.0.4
importlib-metadata==4.2.0
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
mccabe==0.7.0
more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work
packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work
pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work
py @ file:///opt/conda/conda-bld/py_1644396412707/work
pycodestyle==2.9.1
pyflakes==2.5.0
pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work
pytest==6.2.4
toml @ file:///tmp/build/80754af9/toml_1616166611790/work
typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work
zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work

name: conda-pack
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
  - attrs=21.4.0=pyhd3eb1b0_0
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - importlib_metadata=4.8.1=hd3eb1b0_0
  - iniconfig=1.1.1=pyhd3eb1b0_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
  - more-itertools=8.12.0=pyhd3eb1b0_0
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - packaging=21.3=pyhd3eb1b0_0
  - pip=21.2.2=py36h06a4308_0
  - pluggy=0.13.1=py36h06a4308_0
  - py=1.11.0=pyhd3eb1b0_0
  - pyparsing=3.0.4=pyhd3eb1b0_0
  - pytest=6.2.4=py36h06a4308_2
  - 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
  - toml=0.10.2=pyhd3eb1b0_0
  - typing_extensions=4.1.1=pyh06a4308_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zipp=3.6.0=pyhd3eb1b0_0
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - flake8==5.0.4
      - importlib-metadata==4.2.0
      - mccabe==0.7.0
      - pycodestyle==2.9.1
      - pyflakes==2.5.0
prefix: /opt/conda/envs/conda-pack

conda_pack/tests/test_core.py::test_errors_root_environment
conda_pack/tests/test_core.py::test_from_prefix conda_pack/tests/test_core.py::test_errors_editable_packages
conda_pack/tests/test_core.py::test_name_to_prefix conda_pack/tests/test_core.py::test_file
conda_pack/core.py
conda_pack/core.py