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

  • Home
  • SEARCH
  • 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 300845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:57:05+00:00 2026-05-12T06:57:05+00:00

Can someone please explain to me what is going on with python in ubuntu

  • 0

Can someone please explain to me what is going on with python in ubuntu 9.04?

I’m trying to spin up virtualenv, and the --no-site-packages flag seems to do nothing with ubuntu. I installed virtualenv 1.3.3 with easy_install (which I’ve upgraded to setuptools 0.6c9) and everything seems to be installed to /usr/local/lib/python2.6/dist-packages

I assume that when installing a package using apt-get, it’s placed in /usr/lib/python2.6/dist-packages/ ?

The issue is, there is a /usr/local/lib/python2.6/site-packages as well that just sits there being empty. It would seem (by looking at the path in a virtualenv) that this is the folder virtualenv uses as backup. Thus even thought I omit --no-site-packages, I cant access my local systems packages from any of my virtualenv’s.

So my questions are:

  1. How do I get virtualenv to point to one of the dist-packages?
  2. Which dist-packages should I point it to? /usr/lib/python2.6/dist-packages or /usr/local/lib/python2.6/dist-packages/
  3. What is the point of /usr/lib/python2.6/site-packages? There’s nothing in there!
  4. Is it first come first serve on the path? If I have a newer version of package XYZ installed in /usr/local/lib/python2.6/dist-packages/ and and older one (from ubuntu repos/apt-get) in /usr/lib/python2.6/dist-packages, which one gets imported when I import xyz? I’m assuming this is based on the path list, yes?
  5. Why the hell is this so confusing? Is there something I’m missing here?
  6. Where is it defined that easy_install should install to /usr/local/lib/python2.6/dist-packages?
  7. Will this affect pip as well?

Thanks to anyone who can clear this up!

  • 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-12T06:57:05+00:00Added an answer on May 12, 2026 at 6:57 am

    I’d be tempted to hack it by making site-packages a link to dist-packages, but I guess this might affect other cases where you want to install some extension other than from the ubuntu dist. I can’t think of another answer to 1 except tweaking virtualenv’s sources (with both ubuntu and virtualenv being so popular I wouldn’t be surprised to find tweaked versions already exist).

    Re 2, if you’re using /usr/local/bin/python you should use the /usr/local version of the lib (including site-packages) and conversely if you’re using /usr/bin/python.

    Re 3, there will be something there if you ever install an extension for /usr/bin/python from sources (not via easy_install or from ubuntu’s distro).

    Re 4, yes, earlier entries on the path take precedence.

    Re 5, easy_install is easy only in its name — it does so much dark magic that it’s been carefully kept out of the standard python library despite its convenience because the consensus among us python committers is that deep dark magic for convenience is “easy” only on the surface.

    Re 6, I think that’s an ubuntu modification to easy_install — if that’s right then it’s defined wherever Canonical or other ubuntu maintainers make their collective decisions.

    Re 7, sorry, no idea — I have no reasonably recent ubuntu at hand to check.

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

Sidebar

Related Questions

Can someone please explain to me once and for good what are Session Key
Can someone please explain to me what goes to the Output window in VS?
Can someone please explain to me the below code. This behavior has been like
Can someone please explain in detail what these if statements are doing? What does
Can someone please explain to me how to create an ASIHTTPRequest object that can
can someone please explain why the addition of the group by subquery makes this
Can someone please explain to me why my variable called activity is 0 when
I am trying to improve the performance of a Silverlight 4 WCF RIA application.
I have an exam tomorrow in Advanced Development, but I am stuck on the
I heard lots of times virtual function is usually implemented using a vtable. But

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.