Resolving Python Setup Failure During Virtualenvwrapper Installation

When installing virtualenvwrapper via pip, the command python setup.py egg_info may fail with error code 1. The error typically occurs in a temporary directory path like /tmp/pip-build-81rq7yew/virtualenvwrapper/.

Common error output indicates missing dependencies:

Could not find a version that satisfies the requirement pbr (from versions: )
No matching distribution found for pbr

This failure happens because virtualenvwrapper requires the pbr package during its setup phase, but pip cannot locate a compatible version from the specified mirror.

Resolution involves manually installing the missing dependency first:

sudo pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple pbr

After successfully installing pbr, proceed with the virtualenvwrapper installation:

sudo pip3 install virtualenvwrapper

Successful installation will output:

Successfully installed stevedore-1.32.0 virtualenv-clone-0.5.4 virtualenvwrapper-4.8.4

The issue stems from setuptools attempting to fetch build dependencies during package installation. When the build process cannot locate required packages like pbr, it terminates with a non-zero exit status.

Tags: python pip virtualenvwrapper pbr installation

Posted on Mon, 12 Oct 2026 16:20:07 +0000 by zbert