{"id":24303,"library":"pyc-wheel","title":"pyc-wheel","description":"A tool to compile all .py files inside a wheel to .pyc files, optimizing startup time. Current version 2.3.0, supports Python >=3.10,<4.0.0. Maintenance release cadence appears irregular.","status":"active","version":"2.3.0","language":"python","source_language":"en","source_url":"https://github.com/karpierz/pyc_wheel","tags":["wheel","compilation","pyc","optimization"],"install":[{"cmd":"pip install pyc-wheel","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"The module exposes a main function; direct module import does not provide useful API.","wrong":"import pyc_wheel","symbol":"main","correct":"from pyc_wheel import main"}],"quickstart":{"code":"from pyc_wheel import main\n# Compile a wheel in-place\n# main() expects sys.argv style list or uses sys.argv\n# example: main(['pyc-wheel', '--inplace', 'path/to/wheel.whl'])","lang":"python","description":"Import and call main() with appropriate arguments. For CLI usage, run 'pyc-wheel --help'."},"warnings":[{"fix":"Use 'pip install pyc-wheel' and 'from pyc_wheel import main'.","message":"The package name on PyPI is 'pyc-wheel' (with hyphen), but the importable module is 'pyc_wheel' (with underscore). This mismatch is a common source of ImportError.","severity":"gotcha","affected_versions":"all"},{"fix":"Run 'pip wheel . --no-deps -w dist' then 'pyc-wheel dist/*.whl'.","message":"pyc-wheel only works with wheel files, not directories. You must first build a wheel from your project (e.g., 'pip wheel .') before running pyc-wheel.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'pyc-wheel input.whl -o output.whl' or '--output-dir'.","message":"The CLI flag '--inplace' modifies the original wheel file. This may be deprecated in future; prefer outputting to a new file with '--output-dir'.","severity":"deprecated","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'from pyc_wheel import main' (underscore) instead.","cause":"Mistaking the pip package name for the Python module name; 'pyc-wheel' is not importable.","error":"ModuleNotFoundError: No module named 'pyc-wheel'"},{"fix":"Upgrade Python to 3.10 or higher, or use an older version of pyc-wheel (pip install 'pyc-wheel<2').","cause":"Python version too old. pyc-wheel drops support for Python <3.10 as of version 2.0.0.","error":"ERROR: pyc-wheel requires Python >=3.10,<4.0.0 but you have Python 3.9."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}