Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
273 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 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...