Accidental overwrite of OSX Python system framework

I got ahead of myself and downloaded and installed the OSX Python 2.6 package from www.python.org/download/ on my OSX 10.5.5 Intel Mac and installed the full package contents. Only after this did I come across http://wiki.python.org/moin/MacPython/Leopard stating that you should do a partial install of the package to avoid interfering with the system install.

I'm afraid I've already overwritten the system framework through that installer and I remember reading somewhere after discovering this that I'd lose certain elements included in the OSX system install and not Python distributions.

Is there any way to reverse this or restore anything I may have lost? What exactly have I lost and is it going to be a problem?


Asked by: Richard250 | Posted: 28-01-2022






Answer 1

You may have overwritten the system framework but it is more likely that you just overwrote the symlinks in /usr/bin to point to the new version. Try going to /usr/bin and seeing (with something like ls -alsh) where the python symlink points to. It may be python2.6 or 3.0, which is in turn a ln to /System/Library/Frameworks/Python.framework/Versions ... etc. First try resetting the python symlink to the stable or expected version, ie, sudo ln -s /usr/bin/python2.5 python (from the /usr/bin dir.)

Answered by: Julian164 | Posted: 01-03-2022



Answer 2

I just ran into the same thing myself. I did find that the MacPython installer modified my search $PATH and added '/Library/Frameworks/Python.framework/Versions/Current/bin' which caused the python executable there to be found before the one in '/usr/bin'.

Hope this helps anyone else!

Answered by: Alissa470 | Posted: 01-03-2022



Answer 3

Restore from a recent Time Machine backup or somehow from DVD?

Answered by: Aida522 | Posted: 01-03-2022



Similar questions

testing - Prevent accidental close of browser window when there are multiple alerts in selenium with python

I'm writing a test using selenium with python. I'm using PyDev extension in Eclipse. I'm testing a user management system and of course there is a method to test access permissions. Since there are a lot of links in our system and in some cases may all links be unavailable for the user, there would be a lot of alerts to let the user know about not having permission to access. Unfortunately, FireFox closes...


python - Accidental pip freeze outside of virtual env

so this is embarrassing but I'm going to ask it. I accidentally did a pip freeze > requirements.txt command outside of my virtual environment. It has made a requirements.txt file somewhere that I now can not find. I am making the guess it is not good. Any ideas where this file was likely made? I'm on OSX 10.8.5 and running 2.7.5 how to get rid of it? Thanks.


How to prevent accidental publish Python pacakge using setup.py

Is there a way to prevent accidental publication of private package such as "private": true in NPM?


Multiple accidental POST requests in Python

I have this program that sends a GET request using requests library and then sends a POST request to another server. import requests # inside the loop : headers = {'charset':'utf-8','Content-Type':'application/json'} url = "http://someurl/_get_v2.php" data = jenal try : resp = requests.post(url,json=data,headers=headers, timeout=(connect_timeout,read_timeout)) print "Post request sent" # If a...


python - Accidental overlay of graphs in matplotlib

It looks like the datapoints in the first graph accidentally overlays the second graph. The code I'm...


button - Python pygame - avoiding accidental continuous clicking

Edit: added a longer example code. I'm having trouble with coding buttons in pygame. I'm a newbie to the pygame module, so be gentle. Basically, the goal is to make a point-and-click telltale kind of game. The player gets presented with two choices each gameloop, ie "go left" or "go right". Accordingly, there are two buttons in each gameloop, all located at the same coordinates. Here is the funct...


python - How to remove accidental CSS from a Jupyter notebook?

Jupyter lets you change the CSS of an individual notebook within the notebook itself as demonstrated in this answer: from IPython.core.display import HTML HTML(""" <style> // add your CSS styling here </style> """) However Jupyter makes these changes persist somehow and I can't figure out how to get rid of them short of...


python - How to prevent accidental assignment into empty NumPy views

Consider the following Python + NumPy code that executes without error: a = np.array((1, 2, 3)) a[13:17] = 23 Using a slice beyond the limits of the array truncates the slice and even returns an empty view if start and stop are beyond the limits. Assigning to such a slice just drops the input. In my use case the indices are calculated in a non-tri...






Still can't find your answer? Check out these communities...



PySlackers | Full Stack Python | NHS Python | Pythonist Cafe | Hacker Earth | Discord Python



top