pythonnativescripthomebrewapple-m1

Mac M1 python packages error after upgrade to python3


I am writing a project in NativeScript and I received the following error the last few days when I tried the commands: ns run ios or ns doctor.

Couldn't retrieve installed python packages.

The Python 'six' package not found.

enter image description here

I tried python and pip upgrade and also the command pip install six. Nothing of them fixed the problem.

I believe that is not a NativeScript issue, is about the configuration of the python packages in my machine. I mention that I am using a MacBook with M1 chip and it is running the 12.5 OS version.

I will appreciate any suggestions on this situation.


Solution

  • Lastly, I found the solution. It was about the python folder into the path /usr/local/bin/python

    You could check it by the following command: where python

    In my case this folder is missing, perhaps I deleted it after the upgrade of the python3.

    That was a mistake both folders should exist on this path!

    If you type: where python you should receive: /usr/local/bin/python

    If you type: where python3 you should receive: /usr/local/bin/python3

    In order to fix the error, I installed python again by using the brew install pyenv this suggestion helps me to install it properly.

    In the end, in order to eliminate all errors I installed the Python six package by using the command: pip install --ignore-installed six