0

I'm trying to install gwsurrogate package and it need Numpy, so I tried to install it using pip and it said it was installed successfully. However I keep getting this error that "Polyfit is poorly conditioned":

>>> % pip3 install gwsurrogate      
Collecting gwsurrogate
  Using cached gwsurrogate-1.0.6.tar.gz (5.2 MB)
    ERROR: Command errored out with exit status 1:
     command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/xc/4hwyd4314gx75b9tqmy4l7qc0000gn/T/pip-install-0_og_kv1/gwsurrogate/setup.py'"'"'; __file__='"'"'/private/var/folders/xc/4hwyd4314gx75b9tqmy4l7qc0000gn/T/pip-install-0_og_kv1/gwsurrogate/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/xc/4hwyd4314gx75b9tqmy4l7qc0000gn/T/pip-pip-egg-info-xbzt899i
         cwd: /private/var/folders/xc/4hwyd4314gx75b9tqmy4l7qc0000gn/T/pip-install-0_og_kv1/gwsurrogate/
    Complete output (10 lines):
    init_dgelsd failed init
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/xc/4hwyd4314gx75b9tqmy4l7qc0000gn/T/pip-install-0_og_kv1/gwsurrogate/setup.py", line 39, in <module>
        import numpy
      File "/Library/Frameworks/Python.framework/Versions/3.9/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
    
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

I tried to uninstall and reinstall Numpy but nothing changed.

aef
  • 1

2 Answers2

0

Faced this on MacOS 11.1 (Python 3.9.1) while installing numpy as camelot/excalibur dependency. Got it fixed by first upgrading pip latest version:

python3 -m pip install --upgrade pip --user

Found the answer from here: macOS Big Sur python3 cannot import numpy due to polyfit error

If this does not help, you might want to describe what OS version you are on for getting more environment specific help.

0

well, i use windows and with PIP set up, you can use its command line for installing NumPY.

To install NumPy with the package manager for Python 3, run the following command:

pip install numpy

Pip downloads the NumPy package and notifies you it has been successfully installed. To upgrade Pip on windows, enter the following in command prompt:

python -m pip install --upgrade pip

This command first uninstalls the old version of Pip and then installs the most current version of Pip.

After the installation, you can use the show command to verify whether NumPy is now part of your Python packages. Run the following command:

pip3 show numpy

the output should confirm you have Numpy, which version you are using, as well as where the package is stored.

this should get your NumPy installed on windows. if you want a more step by step breakdown on how to go about this, you can find that here

https://www.thewindowsclub.com/how-to-install-numpy-using-pip-on-windows-10

bobby
  • 1
  • 1