RuntimeError: The current Numpy installation fails to pass a sanity check due to a bug in the windows runtime
See original GitHub issueNOTE: THIS IS NOT A SKYFIELD ISSUE BUT IS REPORTED IN CASE SKYFIELD USERS RUN INTO IT
Background: after months of neglecting my Skyfield application I decided to check if everything still runs on updated versions of Python3 (3.8.3rc1 -> 3.9.0), Skyfield (1.20 -> 1.31), Pandas (1.0.3 -> 1.1.4) and Windows 10 (1909 -> 20H2).
Hardware: new PC based on an AMD Ryzen 7 3700X 8-Core Processor
Following a successful new installation of Python 3 I immediately hit this error, i.e. my code didn’t even start:
D:\_DEVelopment\Astronomical coding\CODE - SFalmanac\_debug_code\0sf-v2d-py3>py -3 sfalmanac.py
** On entry to DGEBAL parameter number 3 had an illegal value
** On entry to DGEHRD parameter number 2 had an illegal value
** On entry to DORGHR DORGQR parameter number 2 had an illegal value
** On entry to DHSEQR parameter number 4 had an illegal value
Traceback (most recent call last):
File "D:\_DEVelopment\Astronomical coding\CODE - SFalmanac\_debug_code\0sf-v2d-py3\sfalmanac.py", line 20, in <module>
import tables
File "D:\_DEVelopment\Astronomical coding\CODE - SFalmanac\_debug_code\0sf-v2d-py3\tables.py", line 29, in <module>
from alma_skyfield import *
File "D:\_DEVelopment\Astronomical coding\CODE - SFalmanac\_debug_code\0sf-v2d-py3\alma_skyfield.py", line 25, in <module>
from skyfield.api import Topos, Star, load
File "C:\Python39\lib\site-packages\skyfield\api.py", line 11, in <module>
from .constellationlib import load_constellation_map
File "C:\Python39\lib\site-packages\skyfield\constellationlib.py", line 27, in <module>
from numpy import searchsorted
File "C:\Python39\lib\site-packages\numpy\__init__.py", line 305, in <module>
_win_os_check()
File "C:\Python39\lib\site-packages\numpy\__init__.py", line 302, in _win_os_check
raise RuntimeError(msg.format(__file__)) from None
RuntimeError: The current Numpy installation ('C:\\Python39\\lib\\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
D:\_DEVelopment\Astronomical coding\CODE - SFalmanac\_debug_code\0sf-v2d-py3>
The link mentioned above goes here: https://developercommunity.visualstudio.com/content/problem/1207405/fmod-after-an-update-to-windows-2004-is-causing-a.html
The problem is apparently a fmod bug when using conda python and OpenBLAS 0.3.9 and the final resolution may be “released near the end of January 2021”.
Workaround 1 is related to using a Windows Subsystem for Linux: https://pbpython.com/wsl-python.html which is irrelevant in my case as I have a dual boot PC with Ubuntu 20.04 LTS (and testing on Windows 10 is intentional).
Workaround 4 may be the most practical one for now - using an older version of NumPy:
pip install numpy==1.19.3
(I haven’t experimented with this yet).
Again - my apologies for posting this here - but maybe another workaround can be found for Skyfield? I always welcome constructive feedback 😃
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top GitHub Comments
SUCCESS!
Downgrading the version of NumPy enabled my Skyfield application to run and the output appears to be perfect.
In detail … this was the fix applied:
FINAL STABLE FIX TESTED (and working)
Today I patched my Windows 10 installation with the following Update: 2021-01 Cumulative Update Preview for Windows 10 Version 20H2 for x64-based Systems (KB4598291)
I then tested my software with NumPy version 1.19.4 and it ran perfectly (also with the latest version NumPy 1.20.0) Others in the Microsoft developer community also report positively that this issue is fixed.
Steve Wishnousky (Microsoft) also added this: