Scipy installation problems (no blas or lapack) - python

I tried to update the scipy library, but it failed. Then, I tried to uninstall and reinstall it. Removing the old version was simple, but the pip tool would not let me install the new version. The error message said that the blas and lapack packages were missing. I guess that this is required, but I was able to use scipy until now.
I checked the distributors' websites, but there is no simple way to install lapack or blas. I am not very experienced with manual setups, and I can't find enough information on installing it on my system. I am running 64-bit Windows 8 with Python 2.7 (from Anaconda).
P.S. There may be a simple solution or something obvious that I missed, so please be patient.

Related

Cannot pip install packages relying on updating SciPy - Get repeated wheel errors referencing compilers

This started with me trying to install the pandas-profiling library, which involves an update to SciPy. After this failed repeatedly due to wheel errors (more on this), I used SciPy to test what was going on, and found out this was failing to update, even when using "pip install -U SciPy"
Screenshots of errors below -- what is frustrating is that the log file it claims to generate in fact never is generated and there is not a folder or file where it claims to be and I have been through several iterations of tracking down, and in some cases having to create folders that were missing, updating 2017 build tools based on some of the errors that came up. That could be a whole other thread, but this is where it stands now when I try to update SciPy:
Screenshot of output part 1
Screenshot of output part 2
At this point I am immensely frustrated. What is the fix here? Will uninstalling all Python instances fix this? Or is there a deeper problem? I assumed the latter, but I have been installing things that seem to be missing and there's always something more. What the heck is going on? How can this be so screwed up on my machine and apparently unfixable?
Tried already:
pip install wheel
pip install meson
..and about a million iterations of installing other libraries or different flags on pip, no binary, update, etc. Python's not supposed to be this hard to set up, right? It wasn't before....
The issue looks like it's because you have 32 bit version of python installed and you are going from version 1.4.1 to 1.9.2.
SciPy v1.4.1 has a wheel (prebuilt binary) for 32 bit windows for python 3.8
SciPy v1.9.2 only has a wheel for 64bit windows python 3.8.
So when you installed it first (v1.4.1) everything was already compiled for you and it would have installed no problem.
As there is no wheel for v1.9.2 pip is attempting to build and compile everything from source (tar.gz file).
The SciPy docs say this is a nontrivial exercise but do provide steps https://scipy.github.io/devdocs/dev/contributor/building.html
You should be able to upgrade to v1.9.1 as this has wheel for python 3.8 32 bit.

Can't install Matplotlib on macOS Big Sur

Since I've upgraded my MacOs to Big Sur I'm having some trouble with my data science libraries. I was able to install the numpy and pandas (even though it took an unusual amount of time as stated at this topic). But can't manage to install the Matplotlib.
I've tried three things...
First with the default MacOs embedded Phyton 3.8.2 .
Reinstalled numpy, upgraded pip, but when I've tried to install Matplotlib. I've got the following error:
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
Later, I've seen some suggestions here at stackoverflow for similar problems, one suggested to use homebrew, so I've installed Python 3.9.0 through brew. However, when I've tried to install Matplotlib, still got a giant error, when it was trying to install Pillow:
(.......) The headers or library files could not be found for jpeg,a required dependency when compiling
Pillow from source.Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
ERROR: Command errored out with exit status 1: /usr/local/opt/python#3.9/bin/python3.9 (...)
To finish (in almost despair) I've tried to create a virtual environment using venv (& Python 3.8.2) and was able to install NumPy successfully, however, I've got the following error trying to install Matplotlib:
(...... long line of code....) The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.
This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand. Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.
Really don't know what to do... Is it impossible to use Matplotlib with a clean install on BigSur? hahaha =(
I did it!!! I fix it!!
For this error :
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 fixed installing an older numpy version.
pip3 install --force-reinstall numpy\<1.19
It did the job.
For the second error:
(.......) The headers or library files could not be found for jpeg,a required dependency when compiling
Pillow from source.Please see the install instructions at: https://pillow.readthedocs.io/en/latest/installation.html
ERROR: Command errored out with exit status 1: /usr/local/opt/python#3.9/bin/python3.9 (...)
It was the missing JPEG library. I do recommend you guys install homebrew.
Solved this problem with:
brew install libjpeg
your easy_install is outdated.so just update your setup_tools by excuting following command:
pip install setuptools==51
then
easy_install --version
make sure your easy_install's version is above 51.

GLIBC_2.14 Error Message when Installing Pygrib

Trying to install pygrib via Anaconda package to a remote server. Instillation seems to have worked fine and all supporting libraries have been installed. But when I try to "import pygrib" I receive this message:
ImportError: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /lustre/gporter/anaconda2/lib/python2.7/site-packages/../../libgrib_api-1.10.4.so)
I attempted to update GLIBC to the newest version, but I suspect the problem is hardwired in somewhere.
I attempted to update GLIBC to the newest version
What version did you end up with after the update?
Chances are, it's a version older than 2.14 (or you wouldn't be having this problem).
Note that in general a given distribution, e.g. Ubuntu-14.10, will not update the version of GLIBC ever. This is because GLIBC has a potential to break applications, and the distribution doesn't want to re-test all applications that ever shipped for it.
What you must do is either find a package for your distribution, or update the entire OS.
It's also possible to install newer GLIBC in non-default location, but this is not trivial, as this answer explains.

Unable to Find vcvarsall.bat Windows 10 Python 3.5.1

I'm having an issue installing numpy on Windows 10 x64 with python 3.5.1. When I type pip install numpy, I get the error: unable to find vcvarsall.bat. I've also gotten this error from attempting to install other libraries.
From doing my research on the problem, I know it's related to the Visual C++ compiler for Python, or Visual Studio, as suggested in this answer and others: https://stackoverflow.com/a/10558328/1745715 I've installed both of these (Visual studio 2015, as it is my understanding that 2015 is what I want for python 3.5.1), and can verify that they have added values to my PATH. I've also rebooted the system since. No matter what I try, I still get the error when attempting to install numpy (and other packages) from pip. Could it be that I need a different version of Visual Studio for this version of Python?
I know there are many questions on SO involving similar situations, so before someone marks this a duplicate: I have read them all, and have not found any answer to work for me. Moreover, most of them do not relate to this environment (windows 10 x64, python 3.5.1). The nearest answer was one regarding Python 3.5 on Windows 10 x64 while installing numpy using pip, but the suggestion (to used a precompiled version of numpy and avoid the pip install) was unsatisfactory, as I have other libraries I have to install via pip that are also experiencing the same issues, so I need the compiler to work correctly.

Python Installing Cython & Numba but no vcvarsall.bat despite Visual C++ 2010

I use Python 3.4
I try to install Cython and Numba but keep getting "Unable to find vcvarsall.bat".
I googled for the solution and found that I need Microsoft Visual C++ 2010 installed (for Python 3.4).
So I installed it.
And tried installing Cython and Numba ---> fail.
And then they say I must type "SET VS90COMNTOOLS=%VS100COMNTOOLS%" in the command prompt, which I did, like C:\Users\Dorky>set vs90comntools=%vs100comntools%.
And tried installing Cython and Numba again ---> fail.
Not enough with that, I also went to the environment variables to set this VS90 to VS100 thing manually.
And tried installing Cython and Numba again ---> fail.
So how exactly can I solve this special "Unable to find vcvarsall.bat" problem?
What the heck is so special with this vcvarsall.bat that the user must install Microsoft's programs in order to use it?
Why not just extract out this vcvarsall.bat file as an independent file and then just copy&paste it to any file or directory that needs and not bother with the rest of the software package?
Why not the Python team just extract out this vcvarsall.bat and incorporate it into its Python packages so whenever a user installs Python, he/she will also install vcvarsall.bat along the way and then Python would also know where to look for this file in case needing to install Cython or Numba or any other?
If you're using the python.org version of Python, there's a much easier way to go about things - grab the packages you're interested in from Christoph Gohlke's Python Extension Packages for Windows repository. He has a very large selection of mainly scientific computing-based Python modules, including Cython and numba (you'll need numpy - compiled with Intel's MKL - and llvmlite - which requires this - as well). Everything is precompiled into .whl packages that can be installed with an up-to-date version of pip. Most modules are kept updated with the latest versions on PyPI or other repositories.
This is definitely my go-to site for installing packages on Windows, and if what I'm looking for isn't there, then I'll install via pip or the package source.

Categories