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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:49:49+00:00 2026-06-14T22:49:49+00:00

I work with linux on a servies. And I don’t have the root privilege.

  • 0

I work with linux on a servies. And I don’t have the root privilege. I installed the python-3.2.3 locally to “/home/sam/install_sam”. when I import the tkinter module. I get the following error:

ImportError: No module named _tkinter, please install the python-tk package

I know I need to install the Tkinter module. because I don’t have the root privilege. I can’t use like the following commands:

apt-get install python-tk
sudo apt-get install python-tk

And I search on goolge. I get tcl/tk from here. I install them use the following commands.

cd ~/Downloads/tcl8.5.11/unix
./configure --prefix=/home/sam/install_sam/tcl
make
make install

cd ~/Downloads/tk8.5.11/unix
./configure --prefix=/home/sam/install_sam/tk 
            --with- tcl=/home/sam/Downloads/tcl8.5.11/unix
make
make install

cd ~/Downloads/Python3.2.3/
export LD_LIBRARY_PATH=/home/sam/install_sam/tcl/lib:/home/sam/install_sam/tk/lib
export LD_RUN_PATH=/home/sam/install_sam/tcl/lib:/home/sam/install_sam/tk/lib
./configure --prefix=/home/sam/install_sam/python 
make
make install

I still got error: INFO: Can’t locate Tcl/Tk libs and/or headers. How should I config the tcl/tk for the python

  • 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-14T22:49:50+00:00Added an answer on June 14, 2026 at 10:49 pm

    Use CPPFLAGS environment variable to set the include directories for tcl and tk before building Python 3. This has worked for me.

    export CPPFLAGS="-I/home/sam/install_sam/tcl/include -I/home/sam/install_sam/tk/include"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a python program that must work on Windows and Linux. There are
I have BeautifulSoup 3.x installed on my Linux work machine. I want to use
I have a project being ported to work on Linux under Mono. The project
I have a set of changes which work perfectly against a certain linux version,
I have eclipse 3.7.2 to work on PHP projects that are on remote Linux
I'm working on a server application that's going to work on Linux and Mac
why a usb drive can work in both linux os and windows os without
We work in a mixed case sensitive/insensitive environment (cywgin/linux), and today someone created a
How does buffering work with sockets on Linux? i.e. if the server does not
I use VNC to connect to a Linux workstation at work. At work I

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.