Jupytext with JupyterLab Desktop in conda environment

For the record, I had the same problem, that .py file could not be open as notebook, when I installed jupytext by the following:
pip install jupytext
but with
sudo pip install jupytext
worked.
Probably my jupyter lab was installed with
sudo pip install jupyterlab.