How can I fix this Polyfit error with Numpy in Pycharm?

Viewed 5050

When I run any program that uses Numpy in Pycharm, it returns the following error:

init_dgelsd failed init
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/private/var/folders/0_/ry6vqn855lq0d7n4mww1fks00000gn/T/AppTranslocation/2710F87A-D4CC-42F0-82D4-81D5521E1E33/d/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "/Users/max/venv/lib/python3.9/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

This error is returned whenever I attempt to import numpy, also if I simply type import numpy as np in the python console.

I believe I may have to redownload numpy, but I don't even know how to uninstall it from Pycharm in the first place. Do you guys know whether or not I just have to reinstall Numpy, and if so, how to uninstall it from Pycharm?

2 Answers

Using

pip install numpy 

At the cmd for windows

Get cmd: win_key+r

To uninstall using in cmd:

pip uninstall numpy 

But main problem, I think, with python 3.9

Reinstall to python 3.8 first.

In my case, I was running python 3.8.6, I upgraded the version of NumPy and it worked like a charm.

pip install --upgrade numpy
Related