Registry / devops / viennarna

viennarna

JSON →
library2.7.2pypypi✓ verified 85d ago

A library for the prediction and comparison of RNA secondary structures. Version 2.7.2 supports Python >=3.8. Released monthly to quarterly. Provides RNA folding, sequence design, and structure comparison algorithms.

pip install viennarna
INSTALL
IMPORT
SIG · VIENNARNA
V
viennarna
devopspythonv2.7.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

RNA
import RNA
All functions are accessed from the RNA module. No submodule imports.

Fold an RNA sequence and print the minimum free energy and structure.

import RNA seq = 'GGCGCUUCCUGGCUUU' (fc, mfe) = RNA.fold(seq) print(f"MFE: {mfe} kcal/mol") print(f"Structure: {fc}")
Debug
Known issues
breakingPython 2 support removed in ViennaRNA 2.5.0. Use Python >=3.8.
fix
Upgrade Python to 3.8+.
affects: >=2.5.0
breakingThe RNA.fold() function now returns (fc, mfe) tuple instead of (fc, mfe, dp). The dynamic programming matrix is no longer returned.
fix
Update code to unpack only two values from RNA.fold().
affects: >=2.4.0
deprecatedRNA.fold_compound() is deprecated. Use RNA.fold() or RNA.pf_fold() directly.
fix
Replace RNA.fold_compound() with appropriate direct folding call.
affects: >=2.5.0
gotchaRNA module functions expect sequences as strings, not list or bytes. Passing bytes will raise TypeError.
fix
Ensure input sequences are str objects, e.g., seq = str(seq).
affects: all
Errors
Common errors & fixes
ImportError: No module named RNA
ViennaRNA Python bindings are not installed or not in PYTHONPATH.
fix
Install viennarna with 'pip install viennarna' or ensure the package is available.
RuntimeError: ViennaRNA package not properly installed. The C library is missing.
Installation via pip failed to locate or compile the C library.
fix
Install precompiled wheel (e.g., from PyPI) or install via conda: 'conda install -c bioconda viennarna'.
TypeError: expected string or bytes-like object
Passing a non-string or non-ASCII sequence to RNA functions.
fix
Ensure the sequence is a plain string with only standard RNA bases (A,U,G,C).
Upgrade
Version history
2.7.2latest on PyPI · released Dec 30, 2025
Audit
Dependencies
swigoptionalRequired for building from source; not needed if using precompiled wheels.
numpyoptionalUsed for array operations; often required at runtime.
Agent activity
6 hits · last 30 days
node
6
Resources

No resource links recorded.

viennarna — pip install viennarna · libregistry