Skip to content

Commit

Permalink
Fix FailToDownloadPythonDependencies error (#82) (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
antimora authored Feb 28, 2023
1 parent c510e8b commit 37806b5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions burn-dataset/src/source/huggingface/downloader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ use std::fs;
use std::process::Command;
use thiserror::Error;

const PYTHON: &str = "python3";

#[derive(Error, Debug)]
pub enum DownloaderError {
#[error("unknown: `{0}`")]
Expand Down Expand Up @@ -115,7 +117,7 @@ fn download(
) -> Result<(), DownloaderError> {
download_python_deps(deps)?;

let mut command = Command::new("python");
let mut command = Command::new(PYTHON);

command.arg(dataset_downloader_file_path());

Expand Down Expand Up @@ -193,7 +195,7 @@ fn dataset_downloader_file_path() -> String {
}

fn download_python_deps(deps: &[String]) -> Result<(), DownloaderError> {
let mut command = Command::new("python");
let mut command = Command::new(PYTHON);

command
.args(["-m", "pip", "install", "datasets"])
Expand Down

0 comments on commit 37806b5

Please sign in to comment.