What to do if you get an error like'Qstring' has already been set to version 1 using mne python

Symptoms

After launching ipython

from mayavi import mlab

You can do it when you can reproduce it by typing. 'Qstring' has already been set to version 1 You can see a message like this.

Cause

I'm not sure, but it seems that the version of Qt (one of the libraries that controls the GUI) is different between mne (mayavi used by) and python itself.

Countermeasures

IPython /init.py in my environment To the beginning of (I am from future import absolute_import)

import sip
sip.setapi('QDate', 2)
sip.setapi('QDateTime', 2)
sip.setapi('QString', 2)
sip.setapi('QVariant',2)
sip.setapi('QTextStream',2)
sip.setapi('QTime',2)
sip.setapi('QUrl',2)

After adding, it works fine.

ipython --matploblib=qt

But it worked.

If'Q somehow' appears, I think it will work if you write it in the same way.

Recommended Posts

What to do if you get an error like'Qstring' has already been set to version 1 using mne python
What to do if you get an error when installing python with pyenv
What to do if you get an OpenSSL error when installing Python 2 with pyenv
What to do if you get an error when importing matplotlib in Python (Mac)
What to do if you get an error when trying to load mnist
What to do if you get an error when installing Dlib (Ubuntu)
What to do if you get "Python not configured." Using PyDev in Eclipse
What to do if you get an "unknown service" error from your gRPC server
What to do if you get an Import Error when importing matplotlib with Jupyter
What to do if you get the error ʻERR_FEATURE_UNAVAILABLE_ON_PLATFORM` when using ts-node-dev on Linux
What to do if you run python in IntelliJ and end with an error
What to do if you get a minus zero in Python
What to do if you get Swagger-codegen in python and Import Error: No module named
What to do if you get an Undefined error:'Module_six_moves_urllib_parse' object has no attribute'urlencode' on MacOS
What to do if you get an error when running "certbot renew" in CakePHP environment
What to do if you get an Undefined error when trying to use pip with pyenv
What to do if you get an error saying c compiler cannot create executables in configure
What to do if you couldn't send an email to Yahoo with Python.
What to do if you get a "Wrong Python Platform" warning when using Python with the NetBeans IDE
What to do if you get angry with "Value Error: unknown local: UTF-8" in python manage.py syncdb
[Python] What to do if you get a ModuleNotFoundError when importing pandas using Jupyter Notebook in Anaconda
What to do if you get the error Target WSGI script'/var/www/xxx/xxx.wsgi' cannot be loaded as python module
What to do if you get an error when trying to send a message in tasks.loop () immediately after startup
What to do if you installed pyenv on Mac OS using Homebrew but the python version doesn't switch
What to do if you get `No kernel for language python found` in Hydrogen
What to do if you get a memory error when converting from PySparkDataFrame to PandasDataFrame
What to do if the print command itself causes an error in Maya python
What to do if you get "(35,'SSL connect error')" in pycurl (one of them)
What to do if you get "coverage unknown" in Coveralls
What to do if you get the error "Error: opencv3: Does not support building both Python 2 and 3 wrappers" when installing openCV 3
What to do when you get an error saying "Name resolution temporarily failed" on linux
What to do if you get a Cannot retrieve metalink for repository error in yum
What to do if you get an error when vagrant up when you enable public_network or private_network on Vagrant + Arch Linux → Install netctl
What to do if you get an error like dyld: mach-o, but built for simulator or dyld: attempt to run simulator program outside simulator (DYLD_ROOT_PATH not set) in golang
What to do if you can't install pyaudio with pip #Python
What to do if you get a UnicodeDecodeError with pip install
CommandNotFoundError: Your shell has not been properly configured to use What to do if you get'conda activate'
What to do if you get a must override `get_config` error when trying to model.save in Keras
EC2 / Amazon Linux2: What to do if you get an "unable to execute'gcc': No such file or directory" error with pip install
What to do if you can't use scikit grid search in Python
What to do if you get lost in file reference with FileNotFoundError
What to do if you get angry in TensorFlow v2 without attribute'app'
What to do if you get stuck during Anaconda installation on Linux
What to do if pyenv install does not proceed with an error
[Python] What to do when an error related to SSL authentication is returned
What to do if an error occurs when importing numpy with VScode
What to do if you get a TypeError with numpy min, max
What to do if you get Could not fetch URL 443 with pip
What to do if you should have set an ssh key but are prompted for a password
What to do if PyInstaller3.5 gives an error in Python3.8 (TypeError: an integer is required (got type bytes))
What to do if you get a Permission denied (public key) error when trying to pull on Github
Workaround if you get an error when trying to install PySide with pip
What to do if you get angry with swapon failed: Operation not permitted
What to do if you can't pipenv shell
[python] What to do when an error occurs in send_keys of headless chrome
What to do if a Unicode Encode Error occurs in Sublime Text Python
What to do if you get the error RuntimeError: Python is not installed as a framework when trying to use matplitlib and pylab in Python 3.3
What to do if you are told "Import Error: cannot import name'HTTPSHandler'" when building a virtual environment using virtualenv
[Python] What to check when you get a Unicode Decode Error in Django
What to do if an error occurs when loading a python project created with poetry into VS Code
What to do to get google spreadsheet in python