Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to recover from messed up python installation on mac, and never have to mess with apple's shitty python confusion factory

I am assuming you are here because like me, you installed a bazillion different python interpreters on mac and the whole thing is a spagetti. Today, I finally fixed my python installation. Whatever I install for python2 or python3 using pip JUST.WORKS.. My god! finally.

What the hell?

Here is what I had messed up, which you also probably did:

  • I had too many different python interpreters
  • Too many different symlinks which I lost track of
  • almost no package I installed with pip worked without a headache
  • any attempt to fix using online resources made it worse.

Let's set things right

  • First, remove all the python packages you installed. I am not sure if this is really necessary, but I did it just so I get a fresh start
pip uninstall -y -r <(pip freeze)

(source: https://stackoverflow.com/a/49200334/2770195)

  • Also remove pip cache because why not:
~/Library/Caches/pip
  • Now remove pip
pip uninstall pip
  • Remove all the third party python installations: Careful! Don't delete anything under the /System/ folder. Otherwise you WILL have to reinstall macos, it WILL crash, don't do it.
sudo rm -rf /Library/Frameworks/Python.framework
sudo rm -rf "/Applications/Python 2.7"
cd /usr/local/bin/
ls -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/2.7' | awk '{print $9}' | tr -d @ | xargs rm

(source: https://stackoverflow.com/a/3819829/2770195 but I changed it a bit to remove python3 too)

  • Remove python path stuff
    Edit whatever shell profile you have, like .bash_profile or .zshrc and .zprofile or whichever shell you are using (If you don't know what I'm talking about then it's .bash_profile):
    Delete all lines that have Python.framework in it. In other words, delete old paths related to python.
nano .bash_profile

(source: https://stackoverflow.com/a/3819829/2770195 again)

  • If you have anaconda installed, get rid of that too:
rm -rf ~/anaconda*

(source: https://docs.anaconda.com/anaconda/install/uninstall/)

So far all this was standard. What's important is how you install the new version. Here's the fun part: if you already messed up your python environment, then there is a good chance you messed up permissions with some packages too. Thus any attempt to install new python versions will seem to work fine for now, but will be a brat later on. That's why the next step is so important:

  • Fix old package permissions:
sudo chown -R $USER /usr/local/bin/*

Basically, everything in this folder is supposed to NOT require root priviliges, which if they do they give pip a hard time later on. That's why we made everything belong to us

Let's install the one and only python2 we will use!:

(don't worry we will get to python3 as well)
Now that you fixed the permissions, you can go ahead and install a python2 interpreter that will NOT ever require sudo with pip and hence will install your packages just fine: Here is the trick: We are NOT using easy_install. Got it? No easy_install. It's the devil. brew is love, use brew:

  • If you don't have brew installed (firstly you should be ashamed of yourself):
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Go to your .profile file again

nano .bash_profile

and add these lines:

export PATH="/usr/local/bin:/usr/local/sbin:$PATH"
export PATH="/usr/local/opt/python@2/libexec/bin:$PATH"

now install python2 using brew:

brew install python@2

(this will also install pip)
(source: https://docs.python-guide.org/starting/install/osx/)

Ok, if you haven't screwed up anything so far, you should be able to use pip with a peace of mind. I just tried a bunch of packages like numpy and plotly they all worked right away

Install python3 (optional)

brew install python

(yes, this installs latests python, which is right now python3. Also installs pip)

Golden rule

If you want to maintain the serenity that you have just gained, you have to remember one rule: Never ever use sudo pip install. sudo is the biggest source of confusion with python packages as it screws up the permissions. This is not only true for python, but also nodejs for example, and other environments. There are a lot of posts online that use sudo pip to install packages in their instructions. Always omit the sudo part of that instruction. If you ever accidentally use sudo pip, come back here and apply the steps related to permissions again

gg wp. Now do me a favor and end aging before I die. Just saying. Have fun.

@loisgh
Copy link

loisgh commented Feb 25, 2021

Thanks for these instructions.
I'm not clear on which version of python2 is the system installation and which one's I'm free to uninstall.

which python --> /usr/bin/python
which python2 --> /usr/bin/python2
which python3 --> /usr/bin/python3
which pip --> /usr/local/bin/pip
which pip2 --> /usr/local/bin/pip2
which pip3 --> /usr/bin/pip3

@MuhsinFatih
Copy link
Author

MuhsinFatih commented Feb 25, 2021

@loisgh the /usr/bin version should be a smylink. You can see that by running:

ls -l /usr/bin/python

on my mac it returns:

lrwxr-xr-x  1 root  wheel  75 Jan  1  2020 /usr/bin/python -> ../../System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7

That symlink will already be replaced when you install the homebrew version, so you don't need to worry about it. You can copy paste the code I have for removing existing python versions. I only added an extra warning in case people try to remove the system version as well by themselves.

Also when I wrote this gist python2 was already almost obselete. If you don't have a specific reason to run python2, I would just not even bother with python2 and instead install python3 with homebrew at this point. After that, use python3 to run scripts and pip3 to install packages. Or as others suggested, miniconda could be a good option.

If you already messed up with the existing python2 implementation though, following the steps in the gist could still be worthwhile just for a peace of mind :)

@loisgh
Copy link

loisgh commented Feb 28, 2021

I have python2 which came installed on my mac and can’t be removed. I understand that. Back before I knew very much about python and virtual environments, I installed some packages globally. I would like to remove these packages to save space but I get an error when I try to do this.

python -m pip uninstall numpy

OSError: [Errno 13] Permission denied: ‘/Library/Python/2.7/site-packages/numpy-1.7.1-py2.7.egg-info/PKG-INFO’

I’ve googled and it seems I could do this as long as I use sudo. My question is, can this be done without screwing up the operating system. Are there some packages I should leave alone?

Thanks in advance for your help.

@MuhsinFatih
Copy link
Author

MuhsinFatih commented Mar 1, 2021

@loisgh Ah that's tricky. I don't think any python-dependent system library uses numpy so it should in theory be safe. However you can't be sure. Uninstalling libraries from system python sounds very scary to me. Unless you have large libraries like tensorflow or pytorch which system certainly wouldn't need, I would just leave those packages installed.

I'm not aware of any method to determine which libraries are needed by the system, sorry.

@tcabeen
Copy link

tcabeen commented Apr 10, 2021

Joke's on you. I screwed up my system so bad, pip doesn't work, only pip3.

...wait, that means the joke's actually on me. Aw dang.

@Ndawakh
Copy link

Ndawakh commented Apr 26, 2021

even pip does not work for me, how can I fix that?

@loisgh
Copy link

loisgh commented Apr 27, 2021

@Ndawakh
Copy link

Ndawakh commented Apr 28, 2021

Can you be more specific about what "not working" means? Do you get a command not found error? If so, just add pip to your path. If you are not sure of the path, do which pip in a terminal. BTW this assumes you are on mac or linux. One little tip to note. If you are on a mac and you are installing via homebrew, your python version will be included in the name. For example, I'm using python3.9. When I go to install, I use the command. "pip3.9 install ..." I hope this helps. Lois

-----------------------------------------From: "Ndawakh" To: "MuhsinFatih" Cc: "Lois", "Mention" Sent: Monday April 26 2021 2:02:17PM Subject: Re: MuhsinFatih/pythondoneright.md @Ndawakh commented on this gist. ------------------------- even pip does not work for me, how can I fix that? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub [1], or unsubscribe [2]. Links: ------ [1] https://gist.github.com/ee0154199803babb449b5bb98d3475f7#gistcomment-3720519 [2] https://github.com/notifications/unsubscribe-auth/AAJAFOU3WQFYDETMT4K7XATTKWTCPANCNFSM4NGYFMTA

I have Ubuntu
I tried using the first command "pip uninstall -y -r <(pip freeze)" but I kept getting
Command 'pip' not found, but there are 18 similar ones.
so I changed "pip" to "pip3" and now I get a different type of error
Command 'pip' not found, but there are 18 similar ones. ERROR: You must give at least one requirement to uninstall (see "pip help uninstall")

@MuhsinFatih
Copy link
Author

MuhsinFatih commented May 4, 2021

@Ndawakh can you do this:

What's the output of the following?:

which python
which python2
which python3
which pip
which pip2
which pip3

pip2 -V
pip3 -V

@Ndawakh
Copy link

Ndawakh commented May 5, 2021

I tried ech one of them, some did not give any output (which pip, which pip2, which pip3)

/usr/bin/python
$ which python2
/usr/bin/python2
$ which python3
/usr/bin/python3
$ which pip
$ which pip2
$ which pip3
/usr/bin/pip3
$ pip2 -V

Command 'pip2' not found, did you mean:

  command 'nip2' from deb nip2 (8.7.0-1)
  command 'pip3' from deb python3-pip (20.0.2-5ubuntu1.3)
  command 'pipx' from deb pipx (0.12.3.1-2ubuntu1)

Try: sudo apt install <deb name>

$ pip3 -V
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)```

@amurfey
Copy link

amurfey commented May 5, 2021

Thanks! This was helpful advice to get my environment cleaned up and working again!

@MuhsinFatih
Copy link
Author

MuhsinFatih commented May 5, 2021

Thanks! This was helpful advice to get my environment cleaned up and working again!

Awesome! Glad to hear!

@MuhsinFatih
Copy link
Author

MuhsinFatih commented May 5, 2021

I tried ech one of them, some did not give any output (which pip, which pip2, which pip3)

/usr/bin/python
$ which python2
/usr/bin/python2
$ which python3
/usr/bin/python3
$ which pip
$ which pip2
$ which pip3
/usr/bin/pip3
$ pip2 -V

Command 'pip2' not found, did you mean:

  command 'nip2' from deb nip2 (8.7.0-1)
  command 'pip3' from deb python3-pip (20.0.2-5ubuntu1.3)
  command 'pipx' from deb pipx (0.12.3.1-2ubuntu1)

Try: sudo apt install <deb name>

$ pip3 -V
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)```

Oh no, looks like you're on a linux machine. Sorry I missed that detail earlier. You're following the wrong guide, this is for macos. For linux I would suggest deleting all python installations (google it) and simply installing via apt install or by installing miniconda. But before you install anything new, I would strongly suggest that you make sure you deleted all python related things (all those which commands and stuff I posted should return nothing or did you mean questions). Things are a lot easier on linux side though so you should be good

@andymeadows
Copy link

andymeadows commented May 20, 2021

If you're still trying to install python 2.7 from brew, you MAY want to add these instructions: https://stackoverflow.com/a/63725223

@Maxhirez
Copy link

Maxhirez commented Jun 10, 2021

Just an added note-don't get suckered into using MaxTotalSecurity. I ran a scan today and it marked a bunch of modules I'd been working with as late as this morning as "unsigned" and broke days of work. I'm hoping a Time Machine backup will set things right but I don't know what else it broke.
Screen Shot 2021-06-09 at 7 41 17 PM

@Tarek-Bohdima
Copy link

Tarek-Bohdima commented Jun 11, 2021

messed up pip for python 2.7.16 and upgraded it to pip v 21.1.2

Specs:

macOs BigSur

Iterm2 with ohmyzsh

preinstalled with python2.7.16 & python 3.9.5

Problem :

i upgraded pip without pyenv , so now both pip and pip3 refer to python 3.9.5

i made an alias for python 3.9.5 to be default in .zshrc file

i also used pip to install flask

Questions :

Do i donwgrade pip for python2.7.16?

Or re install python2.7.16 with its pip?

i know i must have used pyenv but; is it possible now ? after 2 versions already installed?

➜  ~ pyenv versions
* system (set by /Users/johnDoe/.pyenv/version)
➜  ~ python2 --version
Python 2.7.16
➜  ~ python3 --version
Python 3.9.5
➜  ~ pip --version
pip 21.1.2 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)
➜  ~ pip3 --version
pip 21.1.2 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)
➜  ~ pip freeze
click==8.0.1
Flask==2.0.1
itsdangerous==2.0.1
Jinja2==3.0.1
MarkupSafe==2.0.1
Werkzeug==2.0.1

➜  ~ where python
python: aliased to /usr/local/bin/python3
/usr/bin/python
➜  ~ where python3
/usr/local/bin/python3
/usr/local/bin/python3
/usr/bin/python3
➜  ~ where pip
pip: aliased to /usr/local/bin/pip3
/usr/local/bin/pip
/usr/local/bin/pip
➜  ~ where pip3
/usr/local/bin/pip3
/usr/local/bin/pip3
/usr/bin/pip3
➜  ~ which pip
pip: aliased to /usr/local/bin/pip3
➜  ~ which pip3
/usr/local/bin/pip3
➜  ~ which python
python: aliased to /usr/local/bin/python3
➜  ~ which python3
/usr/local/bin/python3
➜  ~ which python2
/usr/bin/python2
➜  ~ where flask
/usr/local/bin/flask
/usr/local/bin/flask
➜  ~ which flask
/usr/local/bin/flask
➜  ~ python2 -m pip list
/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: No module named pip
➜  ~ python2 pip --version
/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file 'pip': [Errno 2] No such file or directory
➜  ~ python2 -m pip install "pip<21.0"
/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: No module named pip

@MuhsinFatih
Copy link
Author

MuhsinFatih commented Jun 11, 2021

@tariqywsf having multiple versions is fine. The 'preinstalled' python2 you mentioned seems to be the system installation. I wouldn't touch that at all. If you installed a package, that's fine too. I wrote this post a while ago when python2 was still relevant and at this point noone cares about python2 so it's not even going to affect you. Just make sure to not use sudo pip install ... ever. Sudo with pip is the biggest source of confusion as it screws up the permissions. I noticed now that I hadn't made that clear in the post. I'm updating it now

@Tarek-Bohdima
Copy link

Tarek-Bohdima commented Jun 11, 2021

duely noted , and appreciate your answer, i got my answer , Thanks alot

@apb514
Copy link

apb514 commented Aug 17, 2021

I had the wrong interpreter selected in Pycharm and accidentally installed a bunch of packages into my system folder as well @LosiGH. Would somebody with a clean install of a Mac system python be able to share what comes installed by the system? Perhaps we can pip uninstall everything not on that list?

@MuhsinFatih
Copy link
Author

MuhsinFatih commented Aug 19, 2021

@apb514 only the files under /System are dependencies for macos. You should be fine deleting anything else related to python. It can only break your own environments, but if you're after a clean start you need to do that anyway.

Also since writing this gist a lot has changed. Python2 is no longer relevant, and also I'm strongly convinced that miniconda is the way to go since it can compile c++ dependencies automatically and allows you to manage multiple python versions very easily, and more importantly to me it has better dependency management (conda export is 1000x better than pip freeze). Installing and using miniconda is pretty straightforward, but I can modify the last part of the gist to reflect that. Let me know how that sounds

@nathansmithbz
Copy link

nathansmithbz commented Dec 13, 2021

Stumbled across this when looking for ways to get a fresh start with my Python env! I've dipped in and out a few times, probably changed path variables, used different installation methods including homebrew installed conda etc and almost definitely used sudo when I shouldn't have. I am desperately looking for a way to just wipe everything clean and start again! Even that is proving to be difficult.

If i try

pip uninstall -y -r <(pip freeze)

I get the following:

➜  ~ pip uninstall -y -r <(pip freeze)
Uninstalling pyobjc-framework-AppleScriptObjC-2.5.1:
Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip/_internal/cli/base_command.py", line 143, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip/_internal/commands/uninstall.py", line 75, in run
    auto_confirm=options.yes, verbose=self.verbosity > 0,
  File "/Library/Python/2.7/site-packages/pip/_internal/req/req_install.py", line 683, in uninstall
    uninstalled_pathset.remove(auto_confirm, verbose)
  File "/Library/Python/2.7/site-packages/pip/_internal/req/req_uninstall.py", line 224, in remove
    renames(path, new_path)
  File "/Library/Python/2.7/site-packages/pip/_internal/utils/misc.py", line 280, in renames
    shutil.move(old, new)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 322, in move
    copytree(src, real_dst, symlinks=True)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 231, in copytree
    raise Error, errors
Error: [('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC/AppleScriptObjC/_metadata.pyc', '/private/var/folders/3m/n5hb9vv96nz0qw_91kyndjww0000gn/T/pip-uninstall-MZTpjX/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC/AppleScriptObjC/_metadata.pyc', "[Errno 1] Operation not permitted: '/private/var/folders/3m/n5hb9vv96nz0qw_91kyndjww0000gn/T/pip-uninstall-MZTpjX/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC/AppleScriptObjC/_metadata.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC/AppleScriptObjC/_metadata.py', '/private/var/folders/3m/n5hb9vv96nz0qw_91kyndjww0000gn/T/pip-uninstall-MZTpjX/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC/AppleScriptObjC/_metadata.py', "[Errno 1] Operation not permitted: '/private/var/folders/3m/n5hb9vv96nz0qw_91kyndjww0000gn/T/pip-uninstall-MZTpjX/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC/AppleScriptObjC/_metadata.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC/AppleScriptObjC/__init__.py', '/private/var/folders/3m/n5hb9vv96nz0qw_91kyndjww0000gn/T/pip-uninstall-MZTpjX/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC/AppleScriptObjC/__init__.py', "[Errno 1] Operation not permitted: '/private/var/folders/3m/n5hb9vv96nz0qw_91kyndjww0000gn/T/pip-uninstall-MZTpjX/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC/AppleScriptObjC/__init__.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC/AppleScriptObjC/__init__.pyc', '/private/var/folders/3m/n5hb9vv96nz0qw_91kyndjww0000gn/T/pip-uninstall-MZTpjX/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC/AppleScriptObjC/__init__.pyc', "[Errno 1] Operation not permitted: '/private/var/folders/3m/n5hb9vv96nz0qw_91kyndjww0000gn/T/pip-uninstall-MZTpjX/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC/AppleScriptObjC/__init__.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC/AppleScriptObjC', '/private/var/folders/3m/n5hb9vv96nz0qw_91kyndjww0000gn/T/pip-uninstall-MZTpjX/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC/AppleScriptObjC', "[Errno 1] Operation not permitted: '/private/var/folders/3m/n5hb9vv96nz0qw_91kyndjww0000gn/T/pip-uninstall-MZTpjX/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC/AppleScriptObjC'")]
➜  ~ 
➜  ~ which python
which python2
which python3
which pip
which pip2
which pip3


pip -V
pip2 -V
pip3 -V
/usr/bin/python
/usr/bin/python2
/usr/local/bin/python3
/usr/local/bin/pip
/usr/local/bin/pip2
/usr/local/bin/pip3
pip 18.1 from /Library/Python/2.7/site-packages/pip (python 2.7)
pip 18.1 from /Library/Python/2.7/site-packages/pip (python 2.7)
pip 21.3.1 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)
➜  ~ 

Any ideas where to go from here?

@arosielle
Copy link

arosielle commented Feb 28, 2022

After a day of frustration, most of what you listed worked. There was one failure (can't remember) which I ignored and carried on. Yay. You rock!

@aceabhinavam
Copy link

aceabhinavam commented Mar 21, 2022

I am on the same boat, want to clean my mac of all the useless pieces I installed. I am following your guide and while trying to run the following command -
ls -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/2.7' | awk '{print $9}' | tr -d @ | xargs rm
I get this error

rm: 2to3: Permission denied
rm: 2to3-2: Permission denied
rm: 2to3-2.7: Permission denied
rm: easy_install: Permission denied
rm: easy_install-2.7: Permission denied
rm: idle: Permission denied

appreciate any help here!

@jahmal21000
Copy link

jahmal21000 commented Mar 25, 2022

I have also trouble installing phyton 2.7 on Monterey 12.3 to the path /System/Library/Frameworks/Python.framework/Versions/2.7/Python

@MuhsinFatih
Copy link
Author

MuhsinFatih commented May 5, 2022

Any ideas where to go from here?

@nathansmithbz You should be fine skipping the pip uninstall since we're manually deleting everything that's python-related later in the other steps. My approach was to nuke everything using every possible option I can quickly think of. Probably 30-50% of the steps are redundant but harms not.

After a day of frustration, most of what you listed worked. There was one failure (can't remember) which I ignored and carried on. Yay. You rock!

@arosielle Thanks! Just like my answer right above, some of the steps are actually redundant so ignoring errors should be fine in most cases

I am on the same boat, want to clean my mac of all the useless pieces I installed. I am following your guide and while trying to run the following command - I get this error

@aceabhinavam Try sudo xargs rm at the end of that command. Or xargs sudo rm? I don't really know. One of these should work

@svahora
Copy link

svahora commented May 6, 2022

I'm trying to fix my install as well. Most of the time when I'm using VS Code to install packages it gives me an error and I end up spending hours trying to fix it all just to install a simple python library. Afterwards I usually give up :(
The following is what I have for those queries requested to others:

SV$ which python
/usr/bin/python
SV$ which python2
/usr/bin/python2
SV$ which python3
/usr/bin/python3
SV$ which pip
/usr/local/bin/pip
SV$ which pip2
/
SV$ which pip3
/usr/bin/pip3
SV$ pip2 -V
-bash: pip2: command not found
SV$ pip3 -V
pip 19.0.3 from /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/pip (python 3.7)
SV$ pip -V
-bash: /usr/local/bin/pip: /usr/local/opt/python/bin/python3.7: bad interpreter: No such file or directory

@AllPinkyNoBrain
Copy link

AllPinkyNoBrain commented Jul 11, 2022

thankyou thankyou thankyou thankyou !!!

I was going mad with all this (and I'd stupidly thrown in an upgrade to Monterey in the midst of my madness). This has made my day!
:-)

@crukundo
Copy link

crukundo commented Aug 15, 2022

Just incase anyone finds this in 2022, and can't install python2 with homebrew, some of the threads here (https://stackoverflow.com/questions/60298514/how-to-reinstall-python2-from-homebrew) might help. I used pyenv and reinstalled pip independently on python2 and 3

@Tyler-Pickett
Copy link

Tyler-Pickett commented Aug 16, 2022

After running pip uninstall -y -r <(pip freeze)

I get this error code, everything up to gets deleted. PermissionError: [Errno 13] Permission denied: '/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/__pycache__/six.cpython-37.pyc'

Even though I am admin, I come up as staff when I run ls -la

@dasheck0
Copy link

dasheck0 commented Oct 3, 2022

Thought my system was beyond repair. This actually fixed it. Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment