Answer the question
In order to leave comments, you need to log in
How to run PyQt5 in virtualenv on Windows?
There is a python (3.6.1) virtual environment in which the following packages are installed (using pip):
(virtual) F:\pyqt2>pip freeze
appdirs==1.4.3
packaging==16.8
pyparsing==2.2.0
PyQt5==5.8.2
sip==4.19.2
six==1.10.0
import sys
from PyQt5.QtWidgets import QApplication, QWidget
if __name__ == '__main__':
app = QApplication(sys.argv)
w = QWidget()
w.resize(250, 150)
w.move(300, 300)
w.setWindowTitle('Simple')
w.show()
sys.exit(app.exec_())
(virtual) F:\pyqt2>python run.py
Traceback (most recent call last):
File "run.py", line 2, in <module>
from PyQt5.QtWidgets import QApplication, QWidget
ImportError: DLL load failed: Не найден указанный модуль.
>>> import os
>>> import pprint
>>> import PyQt5
>>>
>>> pprint.pprint(os.environ['PATH'])
('F:\\pyqt2\\virtual\\lib\\site-packages\\PyQt5\\Qt\\bin;F:\\pyqt2\\virtual\\Scripts; ...'
...)
>>>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question