Mark_Salerno | 2020-12-20 14:05:50 UTC | #1
https://www.pythonguis.com/tutorials/first-steps-qt-creator/
Hello I tried to run the basic first example I get this error
from pyqtgraph import PlotWidget
Traceback (most recent call last):
File "<pyshell#9>", line 1, in <module>
from pyqtgraph import PlotWidget
File "C:\Users\Roberta\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\pyqtgraph\__init__.py", line 19, in <module>
import numpy ## pyqtgraph requires numpy
File "C:\Users\Roberta\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\numpy\__init__.py", line 305, in <module>
_win_os_check()
File "C:\Users\Roberta\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\numpy\__init__.py", line 302, in _win_os_check
raise RuntimeError(msg.format(__file__)) from None
RuntimeError: The current Numpy installation ('C:\\Users\\Roberta\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python38\\site-packages\\numpy\\__init__.py')
fails to pass a sanity check due to a bug in the windows runtime.
See this issue for more information: https://tinyurl.com/y3dm3h86
>>>
I reinstalled numpy and pyqtgraph. Can you give me some ideas to resolve this issue
Mark
martin | 2020-12-19 18:49:10 UTC | #2
[quote="Mark_Salerno, post:1, topic:629"]
https://tinyurl.com/y3dm3h86
[/quote]
PyQt6 Crash Course — a new tutorial in your Inbox every day
Beginner-focused crash course explaining the basics with hands-on examples.
This is unfortunately a bug in Windows which will require a fix from Microsoft. The issue is affecting all numpy installations -- the bug is tracked on the link at the bottom. Further down that page you can see this list of possible solutions. These are --
- Python in WSL . This is a no go for PyQt5, as you can't expose WSL GUIs.
- conda + MKL BLAS using
conda create -n mkl python numpy
. Although this requires you to use conda. - conda + OpenBLAS 0.3.12 . (same really)
- Use 1.19.3 Install with
pip install numpy==1.19.3
The only option seems to be either switching to conda for your Python packages, or downgrading to numpy. Note that it says on the link page that you can see encounter the issue on numpy 1.19.3 if you're using SciPy linear algebra routines.
Does that help at all?
Mark_Salerno | 2020-12-19 18:49:10 UTC | #3
Martin Yes that worked. I actually found the fix and went to post it and saw you just answered. I really appreciate the time that you take to fully explain the answers.
I first ran pip uninstall numpy then I ran pip install numpy==1.19.3
I was able to graph after that.
Mark
Sergey_Bellov | 2021-01-20 18:34:31 UTC | #4
install numpy==1.19.3 Here is a solution https://youtu.be/0DgOz3hJeC0
Sergey_Bellov | 2021-02-14 15:04:02 UTC | #5
The solution is here: https://youtu.be/0DgOz3hJeC0
Packaging Python Applications with PyInstaller by Martin Fitzpatrick — This step-by-step guide walks you through packaging your own Python applications from simple examples to complete installers and signed executables.