distribute (legacy wrapper)
raw JSON → 0.7.3 verified Fri May 01 auth: no python deprecated
A legacy compatibility shim for distribute (the former fork of setuptools). It provides backported features and exists primarily for projects that have not migrated to setuptools. Current version 0.7.3 is very old; the package is effectively abandoned. New projects should use setuptools directly.
pip install distribute Common errors
error ImportError: No module named distribute ↓
cause The 'distribute' package is not installed, but the code tries to import it directly.
fix
Install setuptools and use 'from setuptools import setup'.
error AttributeError: module 'distribute' has no attribute 'setup' ↓
cause The user imported distribute and tried to call distribute.setup().
fix
Use 'from setuptools import setup' and call 'setup()' directly.
Warnings
deprecated distribute is considered legacy and is no longer maintained. It has been merged back into setuptools. ↓
fix Replace 'distribute' dependency with 'setuptools'.
gotcha Importing 'distribute' does not provide a separate namespace; it re-exports setuptools. Users often mistakenly think distribute provides its own API. ↓
fix Use from setuptools import ... instead of import distribute.
Imports
- setuptools wrong
import distributecorrectfrom setuptools import setup
Quickstart
from setuptools import setup, find_packages
setup(
name='example',
version='0.1',
packages=find_packages(),
)