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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:10:30+00:00 2026-06-18T05:10:30+00:00

I have python2.6 as my default python and I’ve been using distribute easy_install to

  • 0

I have python2.6 as my default python and I’ve been using distribute easy_install to install packages in ~/.local. easy_install has many issues and I’d like to switch to pip, while at the same time upgrading to python2.7 from python2.6. My existing pip version is tied to python2.6 and always looks in ~/.local/lib/python2.6 for packages. This means I have to install pip again with Python2.7 but it seems like this cannot be done with the existing python2.6 pip, right?

Therefore I tried to download pip and install it like this:

python2.7 setup.py install --prefix=~/.local

Note that I do not have root, so I have to install pip locally. When I try this I get:

Traceback (most recent call last):
  File "setup.py", line 5, in <module>
    from setuptools import setup
ImportError: No module named setuptools

How can I fix this situation? I obviously cannot install setuptools with pip, because I can’t install pip… all I want to do is link up pip with python2.7, upgrade pip and then install everything with pip and forget about easy_install and the old python2.6 and its packages.

When I try the answer below, I get:

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /home/user/.local/lib/python2.7/site-packages

This directory does not currently exist.  Please create it and try again, or
choose a different installation directory (using the -d or --install-dir
option).

I had to manually create (with mkdir) the directory:

~/.local/lib/python2.7/site-packages

This seems broken… it worked once I did it, but why does it require manual creation of a directory?

thanks.

  • 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-18T05:10:31+00:00Added an answer on June 18, 2026 at 5:10 am

    You need to install setuptools first; it has it’s own installation script (it’s part of the egg file):

    wget "http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg"
    sh setuptools-0.6c11-py2.7.egg --prefix=~/.local
    

    Note that it, too, supports a --prefix= option. It’ll find your python2.7 binary (and not the 2.6 version) because you downloaded the 2.7 egg version.

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

Sidebar

Related Questions

If you install multiple versions of python (I currently have the default 2.5, installed
I have been learning Python2.7 for a little bit now. I'm using Windows 7
Python novice here. I am using python2.7.2 on Windows7. I have installed the PyWin32
I have installed python under /opt/python2.7.1/ on CentOS machine which has already python2.4 and
I have python 2.7 installed in /opt/python2.7 . Now i want to install the
I have Karmic Koala which has Python 2.6 installed by default. However I can't
I have installed Python 2.6.7 in $HOME/local of a machine which already has a
I have installed some python packages which I am able to access using IDLE
I have Python 2.7 running on Windows XP. I am trying to install Spynner
I have a problem with python-config --ldflags on OS X 10.6.2. Using my non-system

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.