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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:30:04+00:00 2026-06-08T09:30:04+00:00

>>> sys.path[6] /path/to/django >>> sys.path.pop(6) /path/to/django Then CTRL + D $ python >>> sys.path[6]

  • 0
>>> sys.path[6]
/path/to/django
>>> sys.path.pop(6)
/path/to/django

Then CTRL + D

$ python

>>> sys.path[6]
/path/to/django

O dear…

  • 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-08T09:30:08+00:00Added an answer on June 8, 2026 at 9:30 am

    sys.path is populated from the externally maintained PYTHONPATH variable. Change this variable to get a permanent change when you restart python.

    On unix (including Macs) when using bash it’s configured most likely like this:

    export PYTHONPATH=….

    And this statement is most likely hiding in your .profile or .bashrc file.

    To do this in Windows you need to do something like

    SET PYTHONPATH=….

    And it’s probably somewhere in the system control panel – under environment.

    If you want to see your current setting for PYTHONPATH, go to command (terminal) window and type echo $PYTHONPATH (unix) or echo %PYTHONPATH% (windows)

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

Sidebar

Related Questions

Firstly, here's my script: #!/usr/bin/python import sys, os sys.path.append('/home/username/python') sys.path.append(/home/username/python/flup) sys.path.append(/home/username/python/django) # more path
Where is Python's sys.path initialized from? UPD : Python is adding some paths before
So I have a main.py file inside /home/richard/projects/hello-python directory: import sys sys.path.append('/home/richard/projects/hello-python') from Encode
Python reports an import error, even when a valid package exists on sys.path, if
import os from os.path import abspath, dirname import sys # Set up django project_dir
import sys sys.path.append('/home/myuser/svn-repos/myproject') from myproject.settings import * But, it says module not found when
Now on writing path as sys.path.insert(0,'/home/pooja/Desktop/mysite'), it ran fine asked me for the word
Directories listed in my .pth configuration file aren't appearing in sys.path. The contents of
It's weird to me that the import fails even when it's in the sys.path
I am hosting my Django application on Dreamhost. Dreamhost serves Django-1.2.1 on Python-2.5.2, 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.