DNAnexus Documentation
APIDownloadsIndex of dx CommandsLegal
  • Overview
  • Getting Started
    • DNAnexus Essentials
    • Key Concepts
      • Projects
      • Organizations
      • Apps and Workflows
    • User Interface Quickstart
    • Command Line Quickstart
    • Developer Quickstart
    • Developer Tutorials
      • Bash
        • Bash Helpers
        • Distributed by Chr (sh)
        • Distributed by Region (sh)
        • SAMtools count
        • TensorBoard Example Web App
        • Git Dependency
        • Mkfifo and dx cat
        • Parallel by Region (sh)
        • Parallel xargs by Chr
        • Precompiled Binary
        • R Shiny Example Web App
      • Python
        • Dash Example Web App
        • Distributed by Region (py)
        • Parallel by Chr (py)
        • Parallel by Region (py)
        • Pysam
      • Web App(let) Tutorials
        • Dash Example Web App
        • TensorBoard Example Web App
      • Concurrent Computing Tutorials
        • Distributed
          • Distributed by Region (sh)
          • Distributed by Chr (sh)
          • Distributed by Region (py)
        • Parallel
          • Parallel by Chr (py)
          • Parallel by Region (py)
          • Parallel by Region (sh)
          • Parallel xargs by Chr
  • User
    • Login and Logout
    • Projects
      • Project Navigation
      • Path Resolution
    • Running Apps and Workflows
      • Running Apps and Applets
      • Running Workflows
      • Running Nextflow Pipelines
      • Running Batch Jobs
      • Monitoring Executions
      • Job Notifications
      • Job Lifecycle
      • Executions and Time Limits
      • Executions and Cost and Spending Limits
      • Smart Reuse (Job Reuse)
      • Apps and Workflows Glossary
      • Tools List
    • Cohort Browser
      • Chart Types
        • Row Chart
        • Histogram
        • Box Plot
        • List View
        • Grouped Box Plot
        • Stacked Row Chart
        • Scatter Plot
        • Kaplan-Meier Survival Curve
      • Locus Details Page
    • Using DXJupyterLab
      • DXJupyterLab Quickstart
      • Running DXJupyterLab
        • FreeSurfer in DXJupyterLab
      • Spark Cluster-Enabled DXJupyterLab
        • Exploring and Querying Datasets
      • Stata in DXJupyterLab
      • Running Older Versions of DXJupyterLab
      • DXJupyterLab Reference
    • Using Spark
      • Apollo Apps
      • Connect to Thrift
      • Example Applications
        • CSV Loader
        • SQL Runner
        • VCF Loader
      • VCF Preprocessing
    • Environment Variables
    • Objects
      • Describing Data Objects
      • Searching Data Objects
      • Visualizing Data
      • Filtering Objects and Jobs
      • Archiving Files
      • Relational Database Clusters
      • Symlinks
      • Uploading and Downloading Files
        • Small File Sets
          • dx upload
          • dx download
        • Batch
          • Upload Agent
          • Download Agent
    • Platform IDs
    • Organization Member Guide
    • Index of dx commands
  • Developer
    • Developing Portable Pipelines
      • dxCompiler
    • Cloud Workstation
    • Apps
      • Introduction to Building Apps
      • App Build Process
      • Advanced Applet Tutorial
      • Bash Apps
      • Python Apps
      • Spark Apps
        • Table Exporter
        • DX Spark Submit Utility
      • HTTPS Apps
        • Isolated Browsing for HTTPS Apps
      • Transitioning from Applets to Apps
      • Third Party and Community Apps
        • Community App Guidelines
        • Third Party App Style Guide
        • Third Party App Publishing Checklist
      • App Metadata
      • App Permissions
      • App Execution Environment
        • Connecting to Jobs
      • Dependency Management
        • Asset Build Process
        • Docker Images
        • Python package installation in Ubuntu 24.04 AEE
      • Job Identity Tokens for Access to Clouds and Third-Party Services
      • Enabling Web Application Users to Log In with DNAnexus Credentials
      • Types of Errors
    • Workflows
      • Importing Workflows
      • Introduction to Building Workflows
      • Building and Running Workflows
      • Workflow Build Process
      • Versioning and Publishing Global Workflows
      • Workflow Metadata
    • Ingesting Data
      • Molecular Expression Assay Loader
        • Common Errors
        • Example Usage
        • Example Input
      • Data Model Loader
        • Data Ingestion Key Steps
        • Ingestion Data Types
        • Data Files Used by the Data Model Loader
        • Troubleshooting
      • Dataset Extender
        • Using Dataset Extender
    • Dataset Management
      • Rebase Cohorts and Dashboards
      • Assay Dataset Merger
      • Clinical Dataset Merger
    • Apollo Datasets
      • Dataset Versions
      • Cohorts
    • Creating Custom Viewers
    • Client Libraries
      • Support for Python 3
    • Walkthroughs
      • Creating a Mixed Phenotypic Assay Dataset
      • Guide for Ingesting a Simple Four Table Dataset
    • DNAnexus API
      • Entity IDs
      • Protocols
      • Authentication
      • Regions
      • Nonces
      • Users
      • Organizations
      • OIDC Clients
      • Data Containers
        • Folders and Deletion
        • Cloning
        • Project API Methods
        • Project Permissions and Sharing
      • Data Object Lifecycle
        • Types
        • Object Details
        • Visibility
      • Data Object Metadata
        • Name
        • Properties
        • Tags
      • Data Object Classes
        • Records
        • Files
        • Databases
        • Drives
        • DBClusters
      • Running Analyses
        • I/O and Run Specifications
        • Instance Types
        • Job Input and Output
        • Applets and Entry Points
        • Apps
        • Workflows and Analyses
        • Global Workflows
        • Containers for Execution
      • Search
      • System Methods
      • Directory of API Methods
      • DNAnexus Service Limits
  • Administrator
    • Billing
    • Org Management
    • Single Sign-On
    • Audit Trail
    • Integrating with External Services
    • Portal Setup
    • GxP
      • Controlled Tool Access (allowed executables)
  • Science Corner
    • Scientific Guides
      • Somatic Small Variant and CNV Discovery Workflow Walkthrough
      • SAIGE GWAS Walkthrough
      • LocusZoom DNAnexus App
      • Human Reference Genomes
    • Using Hail to Analyze Genomic Data
    • Open-Source Tools by DNAnexus Scientists
    • Using IGV Locally with DNAnexus
  • Downloads
  • FAQs
    • EOL Documentation
      • Python 3 Support and Python 2 End of Life (EOL)
    • Automating Analysis Workflow
    • Backups of Customer Data
    • Developing Apps and Applets
    • Importing Data
    • Platform Uptime
    • Legal and Compliance
    • Sharing and Collaboration
    • Product Version Numbering
  • Release Notes
  • Technical Support
  • Legal
Powered by GitBook

Copyright 2025 DNAnexus

On this page
  • Does the "dxpy" python module work with Python 2 and Python 3?
  • Do apps that use Python 2 work after January 1, 2020?
  • What are the potential security implications of using Python 2 after January 1, 2020?
  • How long will DNAnexus support the "Python 2 AEE"?
  • How can an app that uses Python 2 be migrated to Python 3?

Was this helpful?

Export as PDF
  1. FAQs
  2. EOL Documentation

Python 3 Support and Python 2 End of Life (EOL)

Last updated 1 year ago

Was this helpful?

As stated on , the Python core development team supports only Python 3.x, having sunsetted Python 2.x support on January 1, 2020. This FAQ explains Python 3.x and Python 2.x support on the DNAnexus platform.

DNAnexus provides Python 3 app execution environment ("Python 3 AEE") based on Ubuntu 16.04 that includes the following:

  • The stock Ubuntu python2.7 interpreter, available at /usr/bin/python

  • The stock Ubuntu python3.5.2 interpreter, available at /usr/bin/python3

  • "dx" command-line client based on python3 interpreter

  • "dxpy" python module installations that work with both python2.7 and python3.5.2 interpreters

An app with dxapp.json containing "runSpec": {"release": "16.04", "version": "1", "interpreter": "python3" ...} will be executed in "Python3 AEE" using python3.5.2 interpreter.

An app with dxapp.json containing "runSpec": {"release": "16.04", "version": "1", "interpreter": "bash" ...} will be executed in "Python3 AEE" using bash interpreter and the dx commands will invoke python3.5.2 installation of dx-toolkit.

For reference, Ubuntu 16.04 apps without"version":"1" in dxapp.json are executed in the legacy "Python 2 AEE" that includes:

  • The dx-toolkit package (including the "dx" command-line client and the "dxpy" python module), configured in a way that requires Python 2.

  • The stock Ubuntu python2.7 interpreter, available at /usr/bin/python.

  • The stock Ubuntu python3.5.2 interpreter, available at /usr/bin/python3.

Does the "dxpy" python module work with Python 2 and Python 3?

The dxpy module works with both Python 2 and Python 3. For historical reasons, the default installation of dxpy in the existing "Python 2 AEE" is python2.7-specific. "Python 3 AEE" removes this constraint. You can continue using pip3 to install a python3-compatible version of the dxpy module outside of the DNAnexus execution environment (e.g. on your laptop).

Do apps that use Python 2 work after January 1, 2020?

Apps that do not rely on installing python2.7 packages using pip at runtime (either through pip dependencies in dxapp.json or throughpip install commands in the shell script) should continue running on the platform.

An app that installs python2.7 packages at runtime may stop working if it depends on the latest version of a package that has dropped python2.7 support, such as numpy or pandas. For such packages, you must specify in your app’s dependencies a specific version of the library that does support python2.7 to ensure your app will continue working with python2.7.

For example, if your dxapp.json specifies the numpy package without a version, i.e. via"execDepends": [ {"name": "numpy", "package_manager": "pip"], the execution will fail trying to install the latest version of numpy with the error message RuntimeError: Python version >= 3.5 required. You can address the problem by specifying an earlier version of numpy, i.e. via"execDepends": [ {"name": "numpy", "package_manager": "pip", "version":"1.16"}]

What are the potential security implications of using Python 2 after January 1, 2020?

Any new security vulnerabilities discovered in Python 2 after January 1, 2020, will remain unpatched. The DNAnexus execution environment isolates the execution of apps in a secure Linux container, and mitigates the impact of potential Python 2 security vulnerabilities. Given the lack of support after Python 2 goes End-of-Life (EOL), significant security vulnerabilities may cause the DNAnexus Platform to disable execution of Python 2 or have you assume full liability for execution of Python 2 customer code.

How long will DNAnexus support the "Python 2 AEE"?

On March 1, 2021, we will stop updating the "Python 2 AEE."

Starting March 1, 2021:

  • We will deprecate and stop updating "Python 2 AEE". We will no longer accept new applets or apps with the "Python 2 AEE" option specified in dxapp.json, or with the "interpreter" option set to "python2.7."

  • The "dx-toolkit" package (including the "dx" command-line client and the "dxpy" python module) will remove support for Python 2. Previously published versions of "dxpy" that had Python 2 support will still be available via pip.

  • For reproducibility reasons, existing apps or applets that rely on the "Python 2 AEE" will continue to run, and will use the last version of dxpy (prior to the cutoff date) that was compatible with Python 2.

How can an app that uses Python 2 be migrated to Python 3?

After we introduce the new "Python 3 AEE" option in dxapp.json, rebuild your app with that option specified. This also applies to bash apps that don't call python code explicitly, but rely on the "dx" command-line client. In addition, if your dxapp.json has the "interpreter" option set to "python2.7," change it to "python3."

If your app depends on other resources, assets, or packages that use Python, ensure that these dependencies have also been updated.

Other alternatives for removing Python 2 dependencies from your app include the following:

  • Encapsulate your app execution environment and app dependencies in a docker container for advanced use cases such as interpreting your app using python 3.8 or running on Ubuntu 18.04, and use docker command supported by Ubuntu 16.04 AEEs.

If your app includes any Python code, make sure it is compatible with Python 3. For more information about porting Python 2 code to Python 3, consult the Python porting guide at .

Re-implement your app in a higher-level workflow description language.

Engage the for assistance with the transition.

python.org
https://docs.python.org/3/howto/pyporting.html
WDL
DNAnexus Professional Services team