473,399 Members | 2,774 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

How to reset sys.exec_prefix?

Somehow on my linux box I scrood things up and I lost my python path info.

If I check sys.exec_prefix or sys.prefix it shows '/usr/local/', where
it should show '/usr/'.

Is there a config file somewhere that I can change to fix this, or do I
need to do a rebuild/reinstall? Hope not.

Thanks,
B
Aug 8 '07 #1
2 2344
Bryan wrote:
Somehow on my linux box I scrood things up and I lost my python path info.

If I check sys.exec_prefix or sys.prefix it shows '/usr/local/', where
it should show '/usr/'.

Is there a config file somewhere that I can change to fix this, or do I
need to do a rebuild/reinstall? Hope not.

Thanks,
B
Actually to clarify a bit here's what I see:
>>sys.prefix
'/usr/local'
>>sys.path
['', '/usr/local/lib/python25.zip', '/usr/local/lib/python2.5',
'/usr/local/lib/python2.5/plat-linux2',
'/usr/local/lib/python2.5/lib-tk',
'/usr/local/lib/python2.5/lib-dynload',
'/usr/local/lib/python2.5/site-packages',
'/usr/local/lib/python2.5/site-packages/PIL']

I am thinking that the prefix is prepended to all the paths.

All my stuff lives in 'usr/lib/python2.5', so I was hoping by just
changing my prefix it would set the rest of the paths accordingly.

B
Aug 8 '07 #2
Bryan wrote:
Bryan wrote:
>Somehow on my linux box I scrood things up and I lost my python path info.

If I check sys.exec_prefix or sys.prefix it shows '/usr/local/', where
it should show '/usr/'.

Is there a config file somewhere that I can change to fix this, or do I
need to do a rebuild/reinstall? Hope not.

Thanks,
B

Actually to clarify a bit here's what I see:
>>sys.prefix
'/usr/local'
>>sys.path
['', '/usr/local/lib/python25.zip', '/usr/local/lib/python2.5',
'/usr/local/lib/python2.5/plat-linux2',
'/usr/local/lib/python2.5/lib-tk',
'/usr/local/lib/python2.5/lib-dynload',
'/usr/local/lib/python2.5/site-packages',
'/usr/local/lib/python2.5/site-packages/PIL']

I am thinking that the prefix is prepended to all the paths.

All my stuff lives in 'usr/lib/python2.5', so I was hoping by just
changing my prefix it would set the rest of the paths accordingly.
It looks like you've installed a local copy. By default, I seem to
remember, Python installs with a prefix of /usr/local, so if you have
/usr/local/bin on your PATH variable you will pick up a local copy in
preference to the standard version installed with the OS.

Try running

/usr/bin/python

and see if that original one is still there (which it probably will be).
Id so, all you need to do is uninstall the local version and things will
magically return to normal.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
--------------- Asciimercial ------------------
Get on the web: Blog, lens and tag the Internet
Many services currently offer free registration
----------- Thank You for Reading -------------

Aug 8 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Ken | last post by:
How can I reset the initial form variables that are set with session statements when clicking on a button? I tried this but the function was not called: <?PHP function reset_form($none) {...
2
by: Charles M. Fish, Sr. | last post by:
I’m so tired from banging this problem around all day, I hope I can explain it succinctly & accurately. I want to execute a function immediately following a click on <input type="RESET"... ...
6
by: Ramachandran Subramanian | last post by:
I have a question regarding the db2 reset monitor. When I issue the command and do a get snapshot I see most of the counters are reset . How ever the Dynamic SQL snapshot section doesnt seem...
1
by: NancyASAP | last post by:
Thought I'd share this since it took me a long time to get it working. Thanks to a bunch of contributers in Google Groups who shared javascript, etc. The question was: How can I put a reset...
2
by: Lance | last post by:
I want to be able to reset a complex property in a PropertyGrid. I know that for properties that are ValueTypes you can include System.ComponentModel.DefaultValue in the declaration of the property....
2
by: Roger Withnell | last post by:
I need to reset a form to its original value using onclick rather than the Reset button. So, I have: <input type="button" name="reset" id="reset" value="Reset" onclick="form1.reset();"> where...
16
by: sreemati | last post by:
Hi everyone, This is the scenario: I have two button - Submit and Reset Submit is used for validation and after validation is passed it passes it to another form to enter into database. ...
11
by: newbie | last post by:
i have a form in which a hidden field (initial value as '0', and my javascript set it to '1' when an event is trigged). In the same form, i have a reset field. But I realized that the hidden field...
16
by: Giovanni D'Ascola | last post by:
Hi. I noticed that <input type="reset"actually don't enable checkbutton which are checked by default after they have been disabled by javascript. It's a bug?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.