{"id":27968761,"url":"https://github.com/octoprint/venv-tool","last_synced_at":"2026-01-28T18:07:26.802Z","repository":{"id":262791620,"uuid":"865475195","full_name":"OctoPrint/venv-tool","owner":"OctoPrint","description":"Command line tool for various tasks for OctoPrint venvs","archived":false,"fork":false,"pushed_at":"2025-10-29T09:26:51.000Z","size":331,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-29T11:19:29.341Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OctoPrint.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-09-30T15:36:22.000Z","updated_at":"2025-10-29T09:26:56.000Z","dependencies_parsed_at":"2024-11-14T10:23:56.088Z","dependency_job_id":"ffce0e40-e64c-4f45-b28e-6191d272ec10","html_url":"https://github.com/OctoPrint/venv-tool","commit_stats":null,"previous_names":["octoprint/venv-tool"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/OctoPrint/venv-tool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OctoPrint%2Fvenv-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OctoPrint%2Fvenv-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OctoPrint%2Fvenv-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OctoPrint%2Fvenv-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OctoPrint","download_url":"https://codeload.github.com/OctoPrint/venv-tool/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OctoPrint%2Fvenv-tool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28848424,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T15:15:36.453Z","status":"ssl_error","status_checked_at":"2026-01-28T15:15:13.020Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-07T21:07:04.967Z","updated_at":"2026-01-28T18:07:26.797Z","avatar_url":"https://github.com/OctoPrint.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# octoprint-venv-tool\n\nA tool to help with various tasks surrounding OctoPrint venvs.\n\n[![Demo of octoprint-venv-tool recreate-venv](https://asciinema.org/a/5NpMS3PfEsGphqO2PJ4ZP0LiE.svg)](https://asciinema.org/a/5NpMS3PfEsGphqO2PJ4ZP0LiE)\n\n## Installation\n\n### Linux \u0026 other POSIX systems\n\n```\ncurl -LO https://get.octoprint.org/octoprint-venv-tool \u0026\u0026 chmod +x octoprint-venv-tool\n```\n\nIt should then be callable via `./octoprint-venv-tool`.\n\n### Windows\n\n```\ncurl -LO https://get.octoprint.org/octoprint-venv-tool\n```\nThen use with `python octoprint-venv-tool`.\n\n## Usage\n\n\u003c!--INSERT:help--\u003e\n```\nusage: octoprint-venv-tool [-h] [--verbose]\n                           {export-plugins,install-plugins,create-venv,recreate-venv} ...\n\nVarious tools for OctoPrint's venvs\n\npositional arguments:\n  {export-plugins,install-plugins,create-venv,recreate-venv}\n    export-plugins      export a list of all OctoPrint plugins installed into\n                        the venv that are available on the repo.\n    install-plugins     install plugins from an export into a provided venv.\n    create-venv         create an OctoPrint venv, installing an optional\n                        plugin export\n    recreate-venv       recreate an OctoPrint venv, attempting to migrate all\n                        plugins installed therein\n\noptions:\n  -h, --help            show this help message and exit\n  --verbose             verbose output\n```\n\u003c!--/INSERT:help--\u003e\n\nAlso see the list of [common workflows](#common-workflows) below.\n\n### `export-plugins`\n\nExport a list of all OctoPrint plugins installed into the venv that are available on the repo.\n\nThe venv does not have to be functional for this anymore.\n\n\u003c!--INSERT:export-plugins--\u003e\n```\nusage: octoprint-venv-tool export-plugins [-h] [--output OUTPUT] venv\n\npositional arguments:\n  venv                 path of the venv\n\noptions:\n  -h, --help           show this help message and exit\n  --output, -o OUTPUT  optional path for the export, if unset stdout will be\n                       used\n```\n\u003c!--/INSERT:export-plugins--\u003e\n\n#### Example\n\n```\n$ ./octoprint-venv-tool export-plugins --output plugins.json ~/oprint\n```\n\n### `install-plugins`\n\nInstall plugins from an export into a provided venv.\n\n\u003c!--INSERT:install-plugins--\u003e\n```\nusage: octoprint-venv-tool install-plugins [-h] [--ignore-plugin-errors]\n                                           export venv\n\npositional arguments:\n  export                path of the export\n  venv                  path of the venv\n\noptions:\n  -h, --help            show this help message and exit\n  --ignore-plugin-errors\n                        Continue if trying to install a plugin raises an error\n```\n\u003c!--/INSERT:install-plugins--\u003e\n\n#### Example\n\n```\n$ ./octoprint-venv-tool install-plugins plugins.json ~/oprint\n```\n\n### `create-venv`\n\nCreate an OctoPrint venv, installing an optional plugin export.\n\n\u003c!--INSERT:create-venv--\u003e\n```\nusage: octoprint-venv-tool create-venv [-h] [--export EXPORT]\n                                       [--python PYTHON]\n                                       [--ignore-plugin-errors]\n                                       venv\n\npositional arguments:\n  venv                  path of the venv\n\noptions:\n  -h, --help            show this help message and exit\n  --export EXPORT       path of the export, optional\n  --python PYTHON       python binary to use for creating the venv, optional,\n                        if not provided the version used to run the script\n                        will be used\n  --ignore-plugin-errors\n                        Continue if trying to install a plugin raises an error\n```\n\u003c!--/INSERT:create-venv--\u003e\n\n#### Example\n\n```\n$ ./octoprint-venv-tool create-venv ~/new-venv --python=/usr/bin/python3.12 --export plugins.json\n```\n\n### `recreate-venv`\n\nRecreate an OctoPrint venv, attempt to migrate all plugins.\n\nThe venv does not have to be functional for this anymore.\n\n\u003c!--INSERT:recreate-venv--\u003e\n```\nusage: octoprint-venv-tool recreate-venv [-h] [--python PYTHON]\n                                         [--ignore-plugin-errors]\n                                         venv\n\npositional arguments:\n  venv                  path of the venv\n\noptions:\n  -h, --help            show this help message and exit\n  --python PYTHON       python binary to use for creating the venv, optional,\n                        if not provided the version used to run the script\n                        will be used\n  --ignore-plugin-errors\n                        Continue if trying to install a plugin raises an error\n```\n\u003c!--/INSERT:recreate-venv--\u003e\n\n#### Example\n\n```\n$ ./octoprint-venv-tool recreate-venv ~/oprint --python=/usr/bin/python3.12\n```\n\n## Common workflows\n\n### Migrating a venv to a newer Python version\n\nIf migrating to a newer Python version, make sure you already have that installed in your system. Be aware that the tool will only\nsupport Python versions \u003e= 3.7.\n\nThen run \n\n    octoprint-venv-tool recreate-venv /path/to/your/venv --python /path/to/python\n\nsubstituting `/path/to/your/venv` with the path to your OctoPrint venv and `/path/to/python` with the path to your python \n*executable*, e.g. `/usr/bin/python3.12`.\n\n\u003e [!NOTE]\n\u003e If any of your currently installed plugins will cause an error while attempting to install them into the new virtual environment,\n\u003e recreation will be aborted and the initial backup of your original venv rolled back.\n\u003e\n\u003e You can ignore errors caused by plugins and make the recreation continue without installing problematic plugins by running\n\u003e the recreation command with the `--ignore-plugin-errors` parameters, e.g.\n\u003e\n\u003e     octoprint-venv-tool recreate-venv /path/to/your/venv --python /path/to/python --ignore-plugin-errors\n\u003e\n\u003e The same parameter is also available on the `create-venv` and `install-plugins` commands.\n\n### Recreating a corrupted venv\n\nIf you need to recreate a corrupted venv, it might be a good time to also update to a newer Python version. But you can also use\nthe one you already are using. In most cases, that should be the default Python 3 version installed on your system, so something\nlike `/usr/bin/python3` on Linux and other POSIX compatible systems. You can run `/usr/bin/python3 --version` to verify that\nhas at least version 3.7.\n\nThen follow the migration steps outlined above.\n\n### Fetching an export of all of the plugins installed into the venv\n\nRun \n\n    octoprint-venv-tool export-plugins --output plugin-export.json /path/to/venv\n    \nsubstituting `/path/to/venv` with the path to your OctoPrint venv. \n\nThat will create a `plugin-export.json` in your current folder that can be installed through\nOctoPrint's plugin manager, or via `octoprint-venv-tool install-plugins`.\n\n### Creating a fresh OctoPrint venv\n\nYou can also use `octoprint-venv-tool` to create a fresh venv with OctoPrint and optionally some plugins from a valid export\nalready preinstalled.\n\nFor that, figure out the Python binary you want to use, then run \n\n    octoprint-venv-tool create-venv --python /path/to/python --export plugin-export.json /path/to/venv\n\nsubstituting the paths accordingly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctoprint%2Fvenv-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foctoprint%2Fvenv-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctoprint%2Fvenv-tool/lists"}