Spyder: You have missing dependencies! parso

Hi, I’m new to manjaro.

One of the first things I did was installing spyder

sudo pacman -S spyder

before I did

sudo pacman -Syu
sudo pacman -Syyu
sudo pacman -Syyuu

Starting spyder I get an error

You have missing dependencies!

Mandatory:

parso =0.7.0 : 0.7.1 (NOK)

Please install them to avoid this message.

trying

sudo pacman -S python-parso
[sudo] password for poisson: 
warning: python-parso-1:0.7.1-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) python-parso-1:0.7.1-1

Total Installed Size:  0.75 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                     [######################] 100%
(1/1) checking package integrity                   [######################] 100%
(1/1) loading package files                        [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
(1/1) checking available disk space                [######################] 100%
:: Processing package changes...
(1/1) reinstalling python-parso                    [######################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...

But still the same error

Welcom @poisson at the forum!

Mark python-parso as dependency:

sudo pacman -D --asdeps python-parso

Afterwards check your database by:

pacman -Dk

Then try to reinstall spyder.

This probably means that the version of Spyder you have installed needs version 0.7.0 of python-parso, whereas you have version 0.7.1 of python-parso installed in your system.

sudo pacman -D --asdeps python-parso   
[sudo] password for poisson: 
python-parso: install reason has been set to 'installed as dependency'


pacman -Dk
No database errors have been found!


sudo pacman -S spyder
warning: spyder-4.1.5-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) spyder-4.1.5-1

Total Installed Size:  36.85 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                     [######################] 100%
(1/1) checking package integrity                   [######################] 100%
(1/1) loading package files                        [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
(1/1) checking available disk space                [######################] 100%
:: Processing package changes...
(1/1) reinstalling spyder                          [######################] 100%
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Updating icon theme caches...
(3/3) Updating the desktop file MIME type cache...

How can I solve that problem?

If you really need parso version 0.7.0 of python-parso you could do sometghing which is normally not recommended as it’s a potential source of breaking your system - you could downgrade parso.

To do so, install the package downgrade.

sudo pacman -S downgrade

Then run

sudo downgrade python-parso

and select the version you think you need. I would also check for other dependecies of parso by

pactree -r python-parso

to see what other packages are affected by such a downgrade.

I don’t need python-parso 0.7.0 but I do need spyder. If there is any other way than downgrading I would prefer that way.

Is anybody else here using spyder?

At least you could check the pactree command as it will tell you if any other package is using python-parso. If that won’t be the case then downgrading python-parso will be safe.

Usually, downgrading is only needed until the package maintainer updates the package in a couple of weeks.

pactree -r python-parso
python-parso
├─python-jedi
│ ├─ipython
│ │ ├─jupyter
│ │ │ └─jupyter-nbconvert
│ │ │   ├─jupyter-notebook
│ │ │   │ └─jupyter-widgetsnbextension
│ │ │   │   └─python-ipywidgets
│ │ │   │     └─jupyter
│ │ │   └─spyder
│ │ ├─jupyter_console
│ │ │ └─jupyter
│ │ ├─python-ipykernel
│ │ │ ├─jupyter
│ │ │ ├─jupyter_console
│ │ │ ├─python-jupyter_client
│ │ │ │ ├─jupyter
│ │ │ │ ├─jupyter-notebook
│ │ │ │ ├─jupyter_console
│ │ │ │ ├─python-ipykernel
│ │ │ │ ├─python-qtconsole
│ │ │ │ │ └─spyder
│ │ │ │ └─python-spyder-kernels
│ │ │ │   └─spyder
│ │ │ ├─python-qtconsole
│ │ │ └─python-spyder-kernels
│ │ └─spyder
│ ├─python-language-server
│ │ └─spyder
│ └─spyder
└─spyder

What does that mean? There are other packages like jupyter and python-jedi afffected, right?

This means the only package finaly being affected as explicit installed package is jupyter. So in worst case jupyter won’t work if you downgrade python-parso.

I would give it a try and check if this solves the spyder issue. If not, then you can always reset it to the newest version by the downgrade tool.

How exactly does the downgrade work?

sudo downgrade python-parso

Downgrading from A.L.A. is disabled on the stable branch. To override this behavior, set DOWNGRADE_FROM_ALA to 1 .
See https://wiki.manjaro.org/index.php?title=Using_Downgrade  for more details.

loading packages...
warning: python-parso-1:0.7.1-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) python-parso-1:0.7.1-1

Total Installed Size:  0.75 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                     [######################] 100%
(1/1) checking package integrity                   [######################] 100%
(1/1) loading package files                        [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
(1/1) checking available disk space                [######################] 100%
:: Processing package changes...
(1/1) reinstalling python-parso                    [######################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
add python-parso to IgnorePkg? [y/N] 

calling the link:

There is currently no text in this page. You can search for this page title in other pages, or search the related logs, but you do not have permission to create this page.

OK, I see. I’m on testing branch and there using downgrade is no issue.

Testing is a pretty stable branch IMHO, if you don’t mind switching to testing you could do this by entering:

sudo pacman-mirrors --api --set-branch testing
sudo pacman-mirrors --fasttrack && sudo pacman -Syyu

If you do a little searching in the Manjaro Wiki, you’ll find this page:
https://wiki.manjaro.org/index.php/Downgrading_packages

See if you have the older version of python-parso in the directory /var/cache/pacman/pkg/ and try downgrading the package manually as described in the Wiki page (you don’t need the package downgrade for that).

If you decide to use the downgrade package, the output is telling you what to do:

export DOWNGRADE_FROM_ALA=1
sudo downgrade python-parso

Finally, the Arch Wiki has information about downgrading packages:
https://wiki.archlinux.org/index.php/Downgrading_packages