(I'm new here, so please be gentle)
When using topgrade in homebrew (I installed topgrade after installing homebrew with brew install topgrade
) on macOS big sur on a 2020 Intel 13" default upper specs MacBook Pro I ran into the following issue:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Looking for a solution on the web I found this article.
Following the advice I ran xcode-select --install
and restarted afterwards.
After running topgrade again I became a bit suspicious when it said:
...
Successfully installed pip-21.1.1
WARNING: You are using pip version 19.2.3, however version 21.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
...
but I though well, seems like it updated itself. So I ran topgrade again and it said
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Requirement already satisfied: pip in ./Library/Python/3.8/lib/python/site-packages (21.1.1)
Since then I've been getting the same answer. I followed the link but found no solution other than the Python workaround, which seems to be a short term solution.
As far as I know have both pip version 19.2.3 as well as 21.1.1 and need to remove the old one right? But how do I do that? And does Requirement already satisfied: pip in ./Library/Python/3.8/lib/python/site-packages (21.1.1)
mean it already fixed itself? And what happens if I ignore the problem?
If anyone could help me out it would really be appreciated. While I love tech I've got no coding experience at all in this is just over my head. That you so much!
Edit: I ran the advice given here and got the following results:
which -a python python2 python2.7 python3 python3.6
showed
/usr/bin/python
/usr/bin/python2
/usr/bin/python2.7
/usr/bin/python3
typing python
and hitting tab (equivalent to compgen -c python
) gave me
python python2 python2.7-config pythonw
python-config python2.7 python3 pythonw2.7
and running locate python
after building the database like described gave me a super long list, which wouldn't fit here.
New Question: I don't really understand the steps I'm supposed to take here before running python -m pip
, but I don't really see any difference whether or not I do these steps anyway. Can I just run python -m pip
without really having a clue what happens?
Second Edit
python -m pip --version
gives /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: No module named pip
and
python3 -m pip --version
gives
pip 21.1.1 from /Users/MyName/Library/Python/3.8/lib/python/site-packages/pip (python 3.8)
Regarding the second comment python -V
gives
Python 2.7.16
and
python3 -V
gives
Python 3.8.2
Also sorry that it's been a while, but we have exams at the moment so I've been kind of busy.
topgrade
(I believe). Please look over the question and make any additional changes you see fit.