Skip to content

Conversation

@cbrnr
Copy link
Contributor

@cbrnr cbrnr commented Jul 22, 2020

Fixes (works around) #8040 hopefully.

@cbrnr
Copy link
Contributor Author

cbrnr commented Jul 22, 2020

This seems to work, but it would be better if we used the most recent pyface (7.0.1). The problem is that for some reason, traits is pinned to 5.2.0, but pyface 7.0.1 requires the latest traits 6.1.0 (which is available in the default channel).

@cbrnr cbrnr marked this pull request as draft July 22, 2020 12:15
@larsoner
Copy link
Member

Do we know which package actually requires pyface<7?

@cbrnr
Copy link
Contributor Author

cbrnr commented Jul 22, 2020

Do we know which package actually requires pyface<7?

No, I tried to let conda solve the conflict, but after working for 15 minutes it spat out a very long list of conflicts that didn't really help me (because every package seemed to conflict with several other packages).

@larsoner
Copy link
Member

Which OS? I tried on macOS and Linux and in both cases conda update conda followed by conda create -n test -f environment.yml from master worked, in both cases installing pyface 7.0.1. So maybe this was just a transient issue?

@larsoner
Copy link
Member

To check, maybe remove the numpydoc and the <7 pin from pyface and see if it succeeds here?

@cbrnr
Copy link
Contributor Author

cbrnr commented Jul 22, 2020

Nope, doesn't work (still downloads and installs 5.2.0). The error log mentions qt4 = traitsui.qt4:toolkit - do we require Qt4 (instead of Qt5) somewhere?

@larsoner
Copy link
Member

If you change it to traits>=6 it should hopefully fail earlier. It's in win64:

https://anaconda.org/anaconda/traits

So some package must require it. I'll fire up the Windows VM for local debugging...

@cbrnr
Copy link
Contributor Author

cbrnr commented Jul 22, 2020

Also, how did conda create -n test -f environment.yml (as you've mentioned here) work? First, -f should be --file, but even then do I get an error because the file wants to install in an env called mne. That's why I have to use conda env update --file environment.yml.

@larsoner
Copy link
Member

Sorry I meant conda env create not conda create

@cbrnr
Copy link
Contributor Author

cbrnr commented Jul 22, 2020

Sorry I meant conda env create not conda create

Thanks, this works (pretty inconsistent argument naming I would say). It does give the same results as conda env update --file environment.yml though, which is traits==5.2.0 on my macOS machine.

Why do you think this is related to Windows? The latest version is on conda for all platforms, and we get the issue on a Linux CI (and on my local macOS).

@larsoner
Copy link
Member

I thought it was installing 6 on macOS and Linux but it wasn't. Changing it to have - traitsui>=6 and - traits>=6 fixes things for me on Linux (pytest mne/gui didn't work before but does now). No idea why it tries to pull traits==5.2.0 if you don't tell it to use 6+. For some reason it installs Python 3.6 though...

@larsoner
Copy link
Member

Adding a python>=3.8 or even python>=3.7 does create conflicts. Argh...

@cbrnr
Copy link
Contributor Author

cbrnr commented Jul 22, 2020

This whole conda thing is a mess. We mix/overwrite with pip because the default channel lags behind recent versions. Should we consider moving to conda-forge as @hoechenberger has repeatedly suggested? It looks like such a situation can occur anytime with our env file with the defaults channel.

@cbrnr
Copy link
Contributor Author

cbrnr commented Jul 22, 2020

(Moving to conda-forge also has the advantage that we can use mamba instead of conda, which is much faster and has more features).

@larsoner
Copy link
Member

larsoner commented Jul 22, 2020

Should we consider moving to conda-forge as @hoechenberger has repeatedly suggested? It looks like such a situation can occur anytime with our env file with the defaults channel.

I've seen problems with conda-forge due to packages not being ready for prime time in other repos that use conda-forge, so I wouldn't think of this as something that will (EDIT: necessarily) solve our problems. It might fix more problems than it creates, but it might also be the reverse.

In any case, this seems to be some base problem. Even this causes a conflict:

name: mne
channels:
- defaults
dependencies:
- python>=3.8
- traits>=6
- pyface>=7
- traitsui>=6

So maybe we should manually pin pyface until they sort it out, and raise an upstream issue.

@cbrnr
Copy link
Contributor Author

cbrnr commented Jul 22, 2020

Agreed - can you raise the upstream issue? You already have a great minimal example. I can pin pyface to the old version in the meantime.

@cbrnr
Copy link
Contributor Author

cbrnr commented Jul 22, 2020

It would still be worth giving conda-forge a try, I'd assume that it will solve more problem than it creates (especially the whole pyqt/PyQt5 conda/pip business).

@hoechenberger
Copy link
Member

It would still be worth giving conda-forge a try, I'd assume that it will solve more problem than it creates (especially the whole pyqt/PyQt5 conda/pip business).

Yes this could definitely be worth a shot. The current approach with conda + pip leads to inconsistent environments that behave in the strangest manner if you try to install or update any conda packages. Not a fan.

@larsoner larsoner marked this pull request as ready for review July 22, 2020 15:47
@larsoner larsoner merged commit a525db9 into mne-tools:master Jul 22, 2020
@larsoner
Copy link
Member

Thanks @cbrnr

@larsoner
Copy link
Member

conda/conda#10095

@drammock
Copy link
Member

by the way, it would have been fine to specify spyder-kerneles>=1.9.2 as @larsoner suggested. It just wouldn't actually fix the problem with macOS Catalina. But no need to go back and do it; it's already WIP in #8020

@cbrnr cbrnr deleted the fix-pkg-version-conflict branch July 22, 2020 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants