Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4021304
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:20:07+00:00 2026-05-20T10:20:07+00:00

So pip and virtualenv sound wonderful compared to setuptools . Being able to uninstall

  • 0

So pip and virtualenv sound wonderful compared to setuptools. Being able to uninstall would be great. But my project is already using setuptools, so how do I migrate? The web sites I’ve been able to find so far are very vague and general. So here’s an anthology of questions after reading the main web sites and trying stuff out:

  • First of all, are virtualenv and pip supposed to be in a usable state by now? If not, please disregard the rest as the ravings of a madman.
  • How should virtualenv be installed? I’m not quite ready to believe it’s as convoluted as explained elsewhere.
  • Is there a set of tested instructions for how to install matplotlib in a virtual environment? For some reason it always wants to compile it here instead of just installing a package, and it always ends in failure (even after build-dep which took up 250 MB of disk space). After a whole bunch of warnings it prints src/mplutils.cpp:17: error: ‘vsprintf’ was not declared in this scope.
  • How does either tool interact with setup.py? pip is supposed to replace easy_install, but it’s not clear whether it’s a drop-in or more complicated relationship.
  • Is virtualenv only for development mode, or should the users also install it?
  • Will the resulting package be installed with the minimum requirements (like the current egg), or will it be installed with sources & binaries for all dependencies plus all the build tools, creating a gigabyte monster in the virtual environment?
  • Will the users have to modify their $PATH and $PYTHONPATH to run the resulting package if it’s installed in a virtual environment?
  • Do I need to create a script from a text string for virtualenv like in the bad old days?
  • What is with the #egg=Package URL syntax? That’s not part of the standard URL, so why isn’t it a separate parameter?
  • Where is @rev included in the URL? At the end I suppose, but the documentation is not clear about this (“You can also include @rev in the URL”).
  • What is supposed to be understood by using an existing requirements file as “as a sort of template for the new file”? This could mean any number of things.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T10:20:07+00:00Added an answer on May 20, 2026 at 10:20 am

    Wow, that’s quite a set of questions. Many of them would really deserve their own SO question with more details. I’ll do my best:

    First of all, are virtualenv and pip
    supposed to be in a usable state by
    now?

    Yes, although they don’t serve everyone’s needs. Pip and virtualenv (along with everything else in Python package management) are far from perfect, but they are widely used and depended upon nonetheless.

    How should virtualenv be installed?
    I’m not quite ready to believe it’s as
    convoluted as explained elsewhere.

    The answer you link is complex because it is trying to avoid making any changes at all to your global Python installation and install everything in ~/.local instead. This has some advantages, but is more complex to setup. It’s also installing virtualenvwrapper, which is a set of convenience bash scripts for working with virtualenv, but is not necessary for using virtualenv.

    If you are on Ubuntu, aptitude install python-setuptools followed by easy_install virtualenv should get you a working virtualenv installation without doing any damage to your global python environment (unless you also had the Ubuntu virtualenv package installed, which I don’t recommend as it will likely be an old version).

    Is there a set of tested instructions
    for how to install matplotlib in a
    virtual environment? For some reason
    it always wants to compile it here
    instead of just installing a package,
    and it always ends in failure (even
    after build-dep which took up 250 MB
    of disk space). After a whole bunch of
    warnings it prints
    src/mplutils.cpp:17: error: ‘vsprintf’
    was not declared in this scope.

    It “always wants to compile” because pip, by design, installs only from source, it doesn’t install pre-compiled binaries. This is a controversial choice, and is probably the primary reason why pip has seen widest adoption among Python web developers, who use more pure-Python packages and commonly develop and deploy in POSIX environments where a working compilation chain is standard.

    The reason for the design choice is that providing precompiled binaries has a combinatorial explosion problem with different platforms and build architectures (including python version, UCS-2 vs UCS-4 python builds, 32 vs 64-bit…). The way easy_install finds the right binary package on PyPI sort of works, most of the time, but doesn’t account for all these factors and can break. So pip just avoids that issue altogether (replacing it with a requirement that you have a working compilation environment).

    In many cases, packages that require C compilation also have a slower-moving release schedule and it’s acceptable to simply install OS packages for them instead. This doesn’t allow working with different versions of them in different virtualenvs, though.

    I don’t know what’s causing your compilation error, it works for me (on Ubuntu 10.10) with this series of commands:

    virtualenv --no-site-packages tmp
    . tmp/bin/activate
    pip install numpy
    pip install -f http://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.0.1/matplotlib-1.0.1.tar.gz matplotlib
    

    The “-f” link is necessary to get the most recent version, due to matplotlib’s unusual download URLs on PyPI.

    How does either tool interact with
    setup.py? pip is supposed to replace
    easy_install, but it’s not clear
    whether it’s a drop-in or more
    complicated relationship.

    The setup.py file is a convention of distutils, the Python standard library’s package management “solution.” distutils alone is missing some key features, and setuptools is a widely-used third-party package that “embraces and extends” distutils to provide some additional features. setuptools also uses setup.py. easy_install is the installer bundled with setuptools. Setuptools development stalled for several years, and distribute was a fork of setuptools to fix some longstanding bugs. Eventually the fork was resolved with a merge of distribute back into setuptools, and setuptools development is now active again (with a new maintainer).

    distutils2 was a mostly-rewritten new version of distutils that attempted to incorporate the best ideas from setuptools/distribute, and was supposed to become part of the Python standard library. Unfortunately this effort failed, so for the time being setuptools remains the de facto standard for Python packaging.

    Pip replaces easy_install, but it does not replace setuptools; it requires setuptools and builds on top of it. Thus it also uses setup.py.

    Is virtualenv only for development
    mode, or should the users also install
    it?

    There’s no single right answer to that; it can be used either way. In the end it’s really your user’s choice, and your software ideally should be able to be installed inside or out of a virtualenv; though you might choose to document and emphasize one approach or the other. It depends very much on who your users are and what environments they are likely to need to install your software into.

    Will the resulting package be
    installed with the minimum
    requirements (like the current egg),
    or will it be installed with sources &
    binaries for all dependencies plus all
    the build tools, creating a gigabyte
    monster in the virtual environment?

    If a package that requires compilation is installed via pip, it will need to be compiled from source. That also applies to any dependencies that require compilation.

    This is unrelated to the question of whether you use a virtualenv. easy_install is available by default in a virtualenv and works just fine there. It can install pre-compiled binary eggs, just like it does outside of a virtualenv.

    Will the users have to modify their
    $PATH and $PYTHONPATH to run the
    resulting package if it’s installed in
    a virtual environment?

    In order to use anything installed in a virtualenv, you need to use the python binary in the virtualenv’s bin/ directory (or another script installed into the virtualenv that references this binary). The most common way to do this is to use the virtualenv’s activate or activate.bat script to temporarily modify the shell PATH so the virtualenv’s bin/ directory is first. Modifying PYTHONPATH is not generally useful or necessary with virtualenv.

    Do I need to create a script from a
    text string for virtualenv like in the
    bad old days?

    No.

    What is with the #egg=Package URL
    syntax? That’s not part of the
    standard URL, so why isn’t it a
    separate parameter?

    The “#egg=projectname-version” URL fragment hack was first introduced by setuptools and easy_install. Since easy_install scrapes links from the web to find candidate distributions to install for a given package name and version, this hack allowed package authors to add links on PyPI that easy_install could understand, even if they didn’t use easy_install’s standard naming conventions for their files.

    Where is @rev included in the URL? At
    the end I suppose, but the
    documentation is not clear about this
    (“You can also include @rev in the
    URL”).

    A couple sentences after that quoted fragment there is a link to “read the requirements file format to learn about other features.” The @rev feature is fully documented and demonstrated there.

    What is supposed to be understood by
    using an existing requirements file as
    “as a sort of template for the new
    file”? This could mean any number of
    things.

    The very next sentence says “it will keep the packages listed in devel-req.txt in order and preserve comments.” I’m not sure what would be a better concise description.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.