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 8047391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T06:04:51+00:00 2026-06-05T06:04:51+00:00

I have ubuntu 10.04 with python2.6 by default. I have installed python2.7. When I

  • 0

I have ubuntu 10.04 with python2.6 by default. I have installed python2.7.

When I want to install python packages with

apt-get python-<package> 

it gets installed to python2.6. How can I make it to install the package to python2.7? Is there any option?

I have looked at this, but I could not find such directories in my OS. I have considered using easy_install-2.7, but not all packages are supported. For example python-torctl.

I am more interested in binding python2.7 with apt-get install.

  • 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-06-05T06:04:52+00:00Added an answer on June 5, 2026 at 6:04 am

    Python has got its own package managing facilities, in parallel to the one sets by the Linux distributions (including Ubuntu). The repository is the Pypi – Python Package Index, and packages are installed with pip or the easy_install script, which is part of Python’s setuptools package.

    As a rule of thumb, you should not use both the packages installed via pip/setuptools, and packages available to your distro (via apt-get, yum, urpmi, etc…) as they might conflict.

    So, one of the less error prone way to deal with it is to have separate Python installs in your system – leave the python that came with the system for system scripts and such – on this python, make use of packages installed by your package manager only. And install other versions of Python (or even the same), to be run with “virtualenv”s – on these other install you install things with pip/setuptools only.

    (And even if one opt to live boldly and not use virtualenvs, installing another python version on the same prefix (/usr, and even /usr/local) than your system’s Python is a source to confusing errors and conflicts).

    Note that the Debian – and Ubuntu – systems devised a way to run parallel official Python’s in /usr, and to have apt-get to install Python packages to both Python versions at once. This mostly works, but they mess with Python’s default directory hierarchy, and some applications fail to use Python in this way. (It is also a mess to find the module files themselves in a Debian or Ubuntu). So the above method apply as a recommendation even if your system do have more than one version of Python available on apt-get.

    In short, once you have compiled your desired version of Python, do this:

    1. use your system’s package manager to install “python-setuptools” and “python-virtualenv” (not sure if these are the actual package names).
    2. Use virtualenv to create an environment from which you will use your different Python version
    3. Activate your virtualenv, and install Python packages using pip on it.

    Virtualenv does feature a “–help” switch to help you, but you basically do:

    $ virtualenv -p <path-to-python-interpreter>  <environment-dir>
    $ source <environment-dir>/bin/activate
    

    And there you are – all things using Python will “see” the interpreter in the virtualenv, due to environment variables set.

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

Sidebar

Related Questions

I have Karmic Koala which has Python 2.6 installed by default. However I can't
On Ubuntu 10.04 by default Python 2.6 is installed, then I have installed Python
I have both python2.7 and python3.2 installed in Ubuntu 12.04 . The symbolic link
I have python 2.5.1 installed on my Ubuntu 10.04 x86_64 machine. When i try
I have ubuntu 11.10 on my machine and I want to install Opencv2.1. I
How can I make symfony completion in bash? Have ubuntu 9.10. It's hard to
Background: I am using Ubuntu The newer python version is not in the apt-get
I want to learn python, so I get python3.2.2 and install it on ubuntu10
I have installed python 2.6.6 and python 2.5.5 on the same machines (Ubuntu 10.0.4),
I have installed some python packages which I am able to access using IDLE

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.