← back to Exo
create directory on startup (#2089)
1fd15d59fc5510e413e2baf75b720020ac8d4e2f · 2026-05-14 17:03:51 +0100 · Heidar
## Motivation
<!-- Why is this change needed? What problem does it solve? -->
<!-- If it fixes an open issue, please link to the issue here -->
When you first run `uv run exo` you get an error like :
`FileNotFoundError: [Errno 2] No such file or directory:
'/Users/heidar/.exo/models'`
Manually tested on Macbook Pro M1 32GB
Fixes issue - https://github.com/exo-explore/exo/issues/2090
Files touched
Diff
commit 1fd15d59fc5510e413e2baf75b720020ac8d4e2f
Author: Heidar <74025356+Heidar-An@users.noreply.github.com>
Date: Thu May 14 17:03:51 2026 +0100
create directory on startup (#2089)
## Motivation
<!-- Why is this change needed? What problem does it solve? -->
<!-- If it fixes an open issue, please link to the issue here -->
When you first run `uv run exo` you get an error like :
`FileNotFoundError: [Errno 2] No such file or directory:
'/Users/heidar/.exo/models'`
Manually tested on Macbook Pro M1 32GB
Fixes issue - https://github.com/exo-explore/exo/issues/2090
---
src/exo/main.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/exo/main.py b/src/exo/main.py
index 7419e688..8e3220eb 100644
--- a/src/exo/main.py
+++ b/src/exo/main.py
@@ -18,7 +18,7 @@ from exo.download.impl_shard_downloader import exo_shard_downloader
from exo.master.main import Master
from exo.routing.event_router import EventRouter
from exo.routing.router import Router, get_node_id_keypair
-from exo.shared.constants import EXO_LOG
+from exo.shared.constants import EXO_DEFAULT_MODELS_DIR, EXO_LOG
from exo.shared.election import Election, ElectionResult
from exo.shared.logging import logger_cleanup, logger_setup
from exo.shared.types.common import NodeId, SessionId
@@ -71,6 +71,9 @@ class Node:
logger.info(f"Starting node {node_id}")
+ # Errors the very first time exo is run as dir doesn't exist
+ EXO_DEFAULT_MODELS_DIR.mkdir(parents=True, exist_ok=True)
+
# Create DownloadCoordinator (unless --no-downloads)
if not args.no_downloads:
download_coordinator = DownloadCoordinator(
← 4466cd53 use custom mlx sources for linux (#2087)
·
back to Exo
·
fix ollama API compatibility for VS Code Copilot (#2091) e8ec8d50 →