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.
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.
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
# 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 -versionThat 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
conda create -n bu-blast --override-channels -c conda-forge -c bioconda blastTwo flags are doing important work here:
--override-channels -c conda-forge -c biocondatells conda to use only those two community channels. This sidesteps the Anacondadefaultschannel, which now stops installs behind a Terms-of-Service prompt. Listconda-forgebeforebioconda, the order matters for the solver.-n bu-blastnames 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
conda activate bu-blastYour 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:
| Path | You get | How |
|---|---|---|
| Native arm64 (what we did) | 2.16.0, fastest, no Rosetta | conda create -n bu-blast --override-channels -c conda-forge -c bioconda blast |
| Latest via Rosetta 2 | 2.17.0, x86-64 under translation | CONDA_SUBDIR=osx-64 conda create -n bu-blast --override-channels -c conda-forge -c bioconda blast=2.17.0 |
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:
blastn -version
makeblastdb -versionblastn: 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.
# 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 6makeblastdb 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.
Common errors and fixes
| Error | Fix |
|---|---|
PackagesNotFoundError for blast=2.17.0 on osx-arm64 | There 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 defaults | You 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 installing | You 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 blastn | You 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 UnsatisfiableError | Always 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 errors | Pin 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:
conda update -n bu-blast --override-channels -c conda-forge -c bioconda blastSave an exact, reproducible snapshot of the env (share this file so a labmate can rebuild it identically):
conda env export -n bu-blast > blast-env.yamlWhen you are done, remove the whole thing in one command. Because everything lived inside the env, nothing lingers on your system:
conda remove -n bu-blast --allNext steps
- Pair BLAST+ with an aligner: see Install BWA and Bowtie2 for read mapping.
- Reach for SAMtools and BCFtools once you are working with alignments and variants.