简体   繁体   中英

Fatal Python error when using PyQt5 in a virtual environment

I have made a virtual environment with venv, and used pip to install PyQt5. When I try any program that uses PyQt5, i get the following error:

Fatal Python error: PyThreadState_Get: no current thread

I am using Python 3.6.0, Anaconda 64 bit, and have installed PyQt5 with pip (version 4.20), on Windows 7 64 bit.

MWE:

from PyQt5 import QtWidgets

I have confirmed this does work on my regular install.

you should install it using this command:

conda install pyqt

And import it like:

import pyqt

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM