Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
269 views
in Technique[技术] by (71.8m points)

Running python script with pypy3 creates a memory error, possible caused by a numpy issue

I'm trying to run a python file with pypy3 but it's leading to a memory error:

pypy3(17349,0x10c27ddc0) malloc: can't allocate region
:*** mach_vm_map(size=18446744072064172032, flags: 100) failed (error code=3)
pypy3(17349,0x10c27ddc0) malloc: *** set a breakpoint in malloc_error_break to debug
init_dgelsd failed init

The traceback leads to a potential error with numpy stating there could be a problem with a buggy accelerate backend:

  File "/usr/local/Cellar/pypy3/7.3.3/libexec/site-packages/investpy/stocks.py", line 10, in <module>
    import pandas as pd
  File "/usr/local/Cellar/pypy3/7.3.3/libexec/site-packages/pandas/__init__.py", line 11, in <module>
    __import__(dependency)
  File "/usr/local/Cellar/pypy3/7.3.3/libexec/site-packages/numpy/__init__.py", line 286, in <module>
    raise RuntimeError(msg)
RuntimeError: Polyfit sanity test emitted a warning, most likely due to using a buggy Accelerate backend. If you compiled yourself, see site.cfg.example for information. Otherwise report this to the vendor that provided NumPy.
RankWarning: Polyfit may be poorly conditioned

I don't have a clue how to fix either of these and there doesn't seem to be many others online using pypy3 enough to find a similar issue and its fix. My guess is that when pypy3 is running it's trying to allocate an outrageous amount of memory for some reason and it overloads, potentially because of some issue with numpy. Any ideas?

question from:https://stackoverflow.com/questions/65865496/running-python-script-with-pypy3-creates-a-memory-error-possible-caused-by-a-nu

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...