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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:19:37+00:00 2026-05-30T04:19:37+00:00

I am trying to install Python 2.7.2 from source files in my Linux machine.

  • 0

I am trying to install Python 2.7.2 from source files in my Linux machine. But I am running into the following problem which has been discussed earlier.

Traceback (most recent call last):
  File "/a/b/python2.7.2/linux26_x86_64/lib/python2.7/compileall.py", line 16, in <module>
    import struct
  File "/a/b/python3.7.2/linux26_x86_64/lib/python2.7/struct.py", line 1, in <module>
    from _struct import *
ImportError: No module named _struct
gmake: *** [libinstall] Error 1

I followed the link provided in the answer and tried a suggestion by Hans Lellelid (hozn) to modify site.py but still no luck.

My system details are:

% cat /etc/*-release
CentOS release 4.6 (Final)

% uname -av
Linux scdbuild04 2.6.9-67.ELsmp #1 SMP Fri Nov 16 12:49:06 EST 2007 x86_64 x86_64 x86_64 GNU/Linux

% gcc -v
Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=x86_64-redhat-linux
Thread model: posix
gcc version 3.4.6 20060404 (Red Hat 3.4.6-9)
  • 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-30T04:19:39+00:00Added an answer on May 30, 2026 at 4:19 am

    I used Activestate Python for installing Python 2.7. I also ran into a problem in the installation which was solved by setting PYTHONHOME env variable correctly as described in this answer.

    % setenv PYTHONHOME /a/b/python2.7.2/linux26_x86_64
    % tar -xzf ActivePython-2.7.2.5-linux-x86_64.tar.gz
    % cd ActivePython-2.7.2.5-linux-x86_64
    % ./install.sh -I /a/b/python2.7.2/linux26_x86_64
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to install cvs2svn on a Solaris 10 machine. It has Python
I'm trying to install Python from source on my Mac. (OS X 10.6.2, Python-2.6.5.tar.bz2)
I'm trying to install python to a 1and1.com shared linux hosting account. There is
I am trying to install GDAL for python on a Windows XP machine (Python
I'm trying to install the cx_Oracle for Python 2.6, but it is failing. I
I am trying to build Python from source and need to include the SSL
I've tried the installation (which terminates successfully) of rpy2 both from source (python setup.py
I was trying to install the following python wrapper for Amazons product api: http://pypi.python.org/pypi/python-amazon-product-api/0.2.5a1
I'm trying to install the Python M2Crypto package into a virtualenv on an x86_64
While trying to install a program from source I found that it installed libraries

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.