{"id":24240,"library":"pip2pi","title":"pip2pi","description":"pip2pi is a tool for building a PyPI-compatible package repository from pip requirements. It takes a requirements.txt file and downloads packages and their dependencies to a local directory that can be served via a web server. Current version is 0.8.2, works with Python 3.8+. Release cadence is infrequent; last release was August 2023.","status":"maintenance","version":"0.8.2","language":"python","source_language":"en","source_url":"https://github.com/wolever/pip2pi","tags":["package repository","pip requirements","offline installation","pypi mirror"],"install":[{"cmd":"pip install pip2pi","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"pip2pi internally calls pip commands; specific versions of pip may cause compatibility issues. Version 18.0+ recommended.","package":"pip","optional":false}],"imports":[{"note":"pip2pi is not directly importable as a module; it's a CLI tool. Use pip2pi.commands or other submodules if needed.","wrong":"import pip2pi","symbol":"pip2pi","correct":"from pip2pi import package_name"}],"quickstart":{"code":"pip2pi /tmp/packages -r requirements.txt","lang":"python","description":"Build a package repository from requirements.txt into /tmp/packages."},"warnings":[{"fix":"Upgrade pip to version 10.0.0 or later.","message":"Version 0.8.0+ removed support for pip<10.0.0. Old downloads from pip's --download option are no longer used.","severity":"breaking","affected_versions":">=0.8.0"},{"fix":"Use pip2pi 0.8.0+ which uses pip download internally.","message":"The --download flag with pip install has been removed; pip2pi now uses pip download.","severity":"deprecated","affected_versions":">=0.8.0"},{"fix":"Use Python 3.8+ or pin to pip2pi <0.8.2 for Python 2 compatibility (not recommended).","message":"Python 2 support dropped. Version 0.8.2 only supports Python 3.8+.","severity":"breaking","affected_versions":">=0.8.2"},{"fix":"Use --wheel-dir or --find-links options to include pre-built wheels.","message":"If your requirements.txt includes packages that require compilation (e.g., numpy, scipy), pip2pi may fail because it cannot download precompiled wheels for the target platform.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use the command-line tool pip2pi instead of importing it as a library. Or import from submodules like pip2pi.commands.","cause":"pip2pi is primarily a CLI tool, not a library with a stable public API. Importing from pip2pi directly is not supported.","error":"ImportError: cannot import name 'package_name' from 'pip2pi'"},{"fix":"Use pip2pi 0.8.0+ without the --download flag. The command is now just 'pip2pi <dir> -r <requirements>'.","cause":"The --download flag was removed in version 0.8.0; pip2pi now uses pip download.","error":"pip2pi: error: unrecognized arguments: --download"},{"fix":"Upgrade to Python 3.2+ or use pip2pi >=0.8.2 which requires Python 3.8+.","cause":"Using Python version older than 3.2; html.escape was introduced in Python 3.2.","error":"AttributeError: module 'html' has no attribute 'escape'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}