Back to Blog
BLASTSequence Search

Install NCBI BLAST+ Locally with Conda for Offline Sequence Search

Beginner guide to installing NCBI BLAST+ on an Apple Silicon Mac with conda, in one isolated env, then verifying blastn and building a database offline.

SSSudipta SardarJuly 20, 20269 min read
Install NCBI BLAST+ Locally with Conda for Offline Sequence Search

BLAST+ is NCBI's sequence-similarity search suite. You build a searchable database from a FASTA file with makeblastdb, then query it with blastn (nucleotide vs nucleotide), blastp (protein vs protein), and relatives like blastx and tblastn. Running it locally means no upload limits, no waiting in NCBI's web queue, and full control over your own custom databases: exactly what you want once your searches get bigger than a handful of sequences.

The trick that keeps this painless is isolation. Instead of installing BLAST+ onto your system and hoping its Perl helper scripts and C++ runtime never clash with another project, we put the whole thing inside its own conda environment. The exact build lives in the env, independent of the rest of your machine. Delete the env and BLAST+ is gone cleanly, with nothing left behind.

Heads up on package names: the bioconda package called blast IS BLAST+ (the modern suite). The old blast-legacy package is the deprecated C-toolkit BLAST. Install blast, never blast-legacy.

Prerequisites

You need conda. If you do not have it yet, follow our Miniconda on Apple Silicon guide first, it takes about five minutes. Everything below was run on an Apple Silicon Mac (arm64), macOS 26.5.2, with conda 25.5.1 and the fast libmamba solver.

If conda environments and channels are new to you, the short version is: an environment is an isolated folder of packages, and channels are the repositories conda downloads from. We cover both in Conda environments and bioconda channels.

TL;DR: copy-paste install

bash
# Create one isolated env with BLAST+ (native arm64 build)
conda create -n bu-blast --override-channels -c conda-forge -c bioconda blast

# Activate it
conda activate bu-blast

# Verify
blastn -version
makeblastdb -version

That is the whole install. The rest of this guide explains what each piece does and how to sanity-check it.

Step by step

1. Create an isolated environment

bash
conda create -n bu-blast --override-channels -c conda-forge -c bioconda blast

Two flags are doing important work here:

  • --override-channels -c conda-forge -c bioconda tells conda to use only those two community channels. This sidesteps the Anaconda defaults channel, which now stops installs behind a Terms-of-Service prompt. List conda-forge before bioconda, the order matters for the solver.
  • -n bu-blast names the environment. One tool, one env, is the habit that keeps dependency conflicts away.

BLAST+ is a comparatively heavy install because it pulls in entrez-direct (NCBI's command-line data tools) along with a small forest of Perl modules that those helper scripts depend on. Here is the real (trimmed) output from the install on the test machine:

### env create: bu-blast  (blast) ###
Channels:
 - conda-forge
 - bioconda
Platform: osx-arm64
Collecting package metadata (repodata.json): done
Solving environment: done

The following NEW packages will be INSTALLED:

  blast              bioconda/osx-arm64::blast-2.16.0-hb260f6e_5
  entrez-direct      bioconda/osx-arm64::entrez-direct-22.4-hd5f1084_0
  ncbi-vdb           bioconda/osx-arm64::ncbi-vdb-3.4.1-hfc726f9_0
  rpsbproc           bioconda/osx-arm64::rpsbproc-0.5.1-hf8bb5b5_0
  perl               conda-forge/osx-arm64::perl-5.32.1-7_h4614cfb_perl5
  wget               conda-forge/osx-arm64::wget-1.25.0-h7ba78b2_1
  curl               conda-forge/osx-arm64::curl-8.21.0-h1359186_2
  ... (plus ~50 perl / zlib / openssl dependencies)

real 53.48
user 29.71
sys 9.65
### EXIT: 0 ###

A few numbers worth trusting: the download totalled 176.1 MB, the solve-and-install finished in about 53 seconds (real 53.48), and the resulting environment is about 675 MB on disk (measured with du -sh; because conda hardlinks shared packages, the incremental cost of an extra env is usually less). That 176.1 MB download and 675 MB footprint make it one of the heavier standard sequence-tool installs. The Perl packages are not bloat you can skip; scripts like update_blastdb.pl genuinely need them.

2. Activate the environment

bash
conda activate bu-blast

Your prompt now shows (bu-blast). The blastn, blastp, makeblastdb, and friends live on your PATH only while this env is active. Deactivate it and they vanish from view, which is exactly the isolation we wanted.

Apple Silicon note

On this Apple Silicon Mac the solver picked a fully native osx-arm64 build, blast-2.16.0-hb260f6e_5, with no Rosetta involved. You can see it in the output above: every line reads osx-arm64, and the platform banner confirms it. Native arm64 means best performance and no translation layer.

There is one wrinkle to know about. As of this writing, bioconda's newest native arm64 build of blast is 2.16.0, while the newest 2.17.0 build exists only for osx-64 (Intel) and Linux. So on Apple Silicon you choose:

PathYou getHow
Native arm64 (what we did)2.16.0, fastest, no Rosettaconda create -n bu-blast --override-channels -c conda-forge -c bioconda blast
Latest via Rosetta 22.17.0, x86-64 under translationCONDA_SUBDIR=osx-64 conda create -n bu-blast --override-channels -c conda-forge -c bioconda blast=2.17.0
For most beginners the native 2.16.0 build is the right call: it is current enough, faster, and needs nothing extra. Only reach for the Rosetta path if you specifically need a 2.17.0 feature. If you do take it, first run softwareupdate --install-rosetta --agree-to-license, then pin the env with conda config --env --set subdir osx-64 so later installs stay on x86-64. That Rosetta path is documented here, not executed on our test machine.

To check what you actually got, run conda list blast (the build string shows the platform) or file $(which blastn) (shows arm64 vs x86_64).

Verify the install

Version checks are the quickest proof BLAST+ is wired up. These ran on the test machine and are real output:

bash
blastn -version
makeblastdb -version
blastn: 2.16.0+
 Package: blast 2.16.0, build Mar 28 2025 16:33:14

makeblastdb: 2.16.0+
 Package: blast 2.16.0, build Mar 28 2025 16:33:14

The 2.16.0+ (with the trailing +) is BLAST+'s own way of reporting itself, and matches the blast-2.16.0 package we installed. Both the search tool and the database builder answer, so the suite is live.

A tiny end-to-end workflow

Versions confirm the binaries run, but the real BLAST+ loop is build a database, then search it. Here is the smallest possible example: make a nucleotide database from one FASTA sequence, then query it with a short substring of that sequence.

bash
# 1) Make a trivial nucleotide FASTA and build a BLAST database
printf '>subject1\nACGTACGTACGTACGTGGGGCCCCAAAATTTTACGTACGTACGT\n' > db.fasta
makeblastdb -in db.fasta -dbtype nucl -out mydb

# 2) Make a query that is a substring of the subject, then search
printf '>query1\nGGGGCCCCAAAATTTT\n' > query.fasta
blastn -query query.fasta -db mydb -task blastn-short -outfmt 6

makeblastdb turns your FASTA into an indexed database (several mydb.* files). blastn then searches your query against it; -task blastn-short tunes the algorithm for very short sequences, and -outfmt 6 asks for compact tab-delimited output. A successful run prints one hit line linking query1 to subject1 at essentially 100% identity. Empty output with exit code 0 means the database built fine but nothing matched, which points at your sequences rather than the install.

This build-and-search example is doc-grounded: it was not executed on our test machine, so no captured output is shown for it. The version checks above are the real, executed verification. Run the workflow yourself in an empty scratch folder to see the hit line.

Common errors and fixes

ErrorFix
PackagesNotFoundError for blast=2.17.0 on osx-arm64There is no native arm64 build of 2.17.0. Install native 2.16.0 (drop the version pin), or prefix the create command with CONDA_SUBDIR=osx-64 to get 2.17.0 under Rosetta. There is no pip install for BLAST+.
CondaToSNonInteractiveError / Terms of Service not accepted for defaultsYou pulled from the Anaconda defaults channel. Use --override-channels -c conda-forge -c bioconda so only community channels are used.
blastn: command not found after installingYou forgot to activate the env. Run conda activate bu-blast. The binaries live inside the env, not on the base PATH.
Bad CPU type in executable when running blastnYou built an osx-64 (Rosetta) env but Rosetta 2 is not installed. Run softwareupdate --install-rosetta --agree-to-license, then retry.
Solver hangs or reports UnsatisfiableErrorAlways list conda-forge before bioconda, and keep one tool per env. Switching to the libmamba solver or using mamba also helps.
A later conda install mixes arm64 and x86-64 builds, causing dylib errorsPin the env's architecture once with conda config --env --set subdir osx-64 (inside the activated env) so future installs stay consistent.

Managing the environment

Update BLAST+ later, still forcing the community channels:

bash
conda update -n bu-blast --override-channels -c conda-forge -c bioconda blast

Save an exact, reproducible snapshot of the env (share this file so a labmate can rebuild it identically):

bash
conda env export -n bu-blast > blast-env.yaml

When you are done, remove the whole thing in one command. Because everything lived inside the env, nothing lingers on your system:

bash
conda remove -n bu-blast --all

Next steps