Registry / serialization / pyminizip

pyminizip

JSON →
library0.2.6pypypi✓ verified 87d ago

Pyminizip is a Python wrapper for the minizip library, designed specifically to create password-encrypted ZIP files. It also provides functionality to uncompress these password-protected archives. The current version is 0.2.6. The project appears to be in maintenance mode with infrequent updates, as its last release was in December 2021.

pip install pyminizip
INSTALL
IMPORT
SIG · PYMINIZIP
P
pyminizip
serializationpythonv0.2.6
Install
Import
Disk
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
build_error
glibc
py 3.103.920 runs
build_error
Code
Verified usage

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

pyminizip
import pyminizip

This quickstart demonstrates how to compress a single file into a password-protected ZIP archive and then uncompress it using `pyminizip`.

import pyminizip import os # Create dummy files for demonstration with open("file1.txt", "w") as f: f.write("This is file one.") zip_filename = "my_archive.zip" password = "supersecretpassword" extract_dir = "extracted_files" # 1. Compress a single file with password pyminizip.compress( "file1.txt", None, # Prefix path (None to use relative path) zip_filename, password, 5 # Compression level (0 for default, 1-9 for speed/compression balance) ) print(f"'{zip_filename}' created with password protection from 'file1.txt'.") # 2. Extract the password-protected zip os.makedirs(extract_dir, exist_ok=True) pyminizip.uncompress( zip_filename, password, extract_dir, 0 # Not specifying 'withoutpath' ) print(f"'{zip_filename}' uncompressed to '{extract_dir}'.") # Clean up dummy files and directories os.remove("file1.txt") os.remove(zip_filename) os.remove(os.path.join(extract_dir, "file1.txt")) os.rmdir(extract_dir) print("Cleanup complete.")
pyminizip --version
Debug
Known issues
gotchaOn Windows, `pyminizip` often requires Microsoft Visual C++ 14.0 or greater (i.e., MSVC build tools) to compile during installation, as it is a C extension wrapper. Installation via `pip` may fail without these tools installed.
fix
Install 'Microsoft C++ Build Tools' from Visual Studio's website or via the Visual Studio Installer if on Windows.
affects: All versions
gotchaThe project is explicitly marked as 'Inactive' in terms of maintenance, with no new versions released in the past 12 months (as of February 2026, last release was Dec 2021) and limited community activity. This indicates a potential lack of ongoing development, security updates, or bug fixes.
fix
Be aware of the project's maintenance status. Consider auditing the codebase for security vulnerabilities or contributing fixes if critical issues arise.
affects: 0.2.6 and possibly earlier
gotchaUsers have reported issues with non-ASCII characters (e.g., Chinese filenames) in file paths leading to errors, especially on Windows platforms, due to encoding challenges in the underlying C library wrapper.
fix
Avoid using non-ASCII characters in file paths for compression or decompression with `pyminizip`, especially on Windows.
affects: All versions
gotchaOn Linux environments, `pyminizip` may encounter `ImportError` due to 'GLIBC_2.33' (or similar) not found errors. This typically indicates a mismatch between the GLIBC version used to compile the library and the GLIBC version available on the target system, common in containerized or diverse Linux environments.
fix
Ensure that the `pyminizip` package is built or installed in an environment with a GLIBC version compatible with your deployment target. Building from source in the target environment or using a compatible base image in containers might resolve this.
affects: All versions
gotchaDespite reaching version 0.2.6, the PyPI classifiers for `pyminizip` indicate its development status as '3 - Alpha'. This suggests the maintainer considers the project to be in an early, experimental stage, implying potential instability or API changes without strict adherence to semantic versioning.
fix
Use with caution in production environments, and thoroughly test for stability. Be prepared for potential breaking changes or unexpected behavior.
affects: All versions
Errors
Common errors & fixes
error: Microsoft Visual C++ 14.0 or greater is required.
Pyminizip is a Python wrapper around a C library (minizip), and its installation via pip on Windows requires a C++ compiler to build the extension module.
fix
Install 'Microsoft C++ Build Tools' from Visual Studio's website or via the Visual Studio Installer if on Windows.
ImportError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found
This error occurs on Linux systems, particularly in containerized environments, when the pyminizip package was compiled against a newer GLIBC version (e.g., GLIBC_2.33) than is available on the target system.
fix
Ensure the `pyminizip` package is built or installed in an environment with a GLIBC version compatible with your deployment target, often by building from source in the target environment or using a compatible base image in containers.
ModuleNotFoundError: No module named 'pyminizip'
This typically means the `pyminizip` package was not successfully installed in the Python environment, or the environment where it was installed is not the one being used.
fix
First, try `pip install pyminizip`. If that fails, check for underlying installation errors like missing C++ build tools (on Windows) or GLIBC compatibility issues (on Linux), as these prevent successful package compilation and installation.
ValueError: expected arguments are compress(src, srcpath, dst, pass, level)
This error usually arises when calling `pyminizip.compress` with an incorrect number or type of arguments, often when trying to pass a file-like object (like a `tempfile`) directly instead of its string path.
fix
Ensure all five arguments are provided and are of the correct type (strings for paths/password, integer for compression level). When using temporary files, pass the `.name` attribute of the temporary file/directory object as the path. For example, use `tmp.name` instead of `tmp` if `tmp` is a temporary file object.
Upgrade
Version history
0.2.6latest on PyPI · released Dec 21, 2021
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
OpenAI (training)
1
Resources
pyminizip — pip install pyminizip · libregistry