scipy installation error : compiler gfortran cannot compile the program - scipy

I am installing scipy via pip3 on puppylinux (raspi).
gfortran is already there but scipy installation is giving error
../../meson.build:63:0: ERROR: Compiler gfortran can not compile programs.
Then I found that there was python3-scipy in package manager. I installed it in the venv but importing scipy fails to find it.
Can someone point the problem?

Related

pip failing to build wheels for scipy

I've just downloaded the new python 3.8 and I'm trying to install the scipy package using the following:
pip3.8 install scipy
However the build fails with the following error:
**Failed to build scipy**
**ERROR: Could not build wheels for scipy which use PEP 517 and cannot be installed directly**
How can I install this using pip? I tried using the --no-binary version:
pip3.8 install --no-binary :all: scipy
but ended up with an even scarier error:
**ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/8p/01_5ykld02v61rtjl8k_8j200000gp/T/pip-install-wlnk_0jg/scipy/setup.py'"'"'; __file__='"'"'/private/var/folders/8p/01_5ykld02v61rtjl8k_8j200000gp/T/pip-install-wlnk_0jg/scipy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/8p/01_5ykld02v61rtjl8k_8j200000gp/T/pip-record-01j_ddt8/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.**
I think I got the same issue as you did. Did the error code have this message
error: library dfftpack has Fortran sources but no Fortran compiler found?
Because to me, it sounds like a Fortran compiler error, and not a mistake of python per se. I think what happens is that the wheel requires some sort of Fortran compiler and when the installation doesn't find one it simply terminates the build. Here is the solution that I found:
Linux
sudo apt install gfortran
Windows / Mac
Download it from here: https://gcc.gnu.org/wiki/GFortran#download
This solution fixed it for me. Check out: Still can't install scipy due to missing fortran compiler after brew install gcc on Mac OS X for more details.

Upgrading Scipy on IronPython

I'm kind of new to Scipy and IronPython, so please excuse any dummy question I might be asking.
Anyway, I'm trying to upgrade my scipy version to >1.1 on my IronPython 2.7.5 (OS is Windows 7 64bit) but I am not really sure how to do it.
My current scipy version is 1.0.0.
I've tried to run from command prompt:
ipy -X:Frames -m pip install --upgrade scipy
But I'm getting this:
Downloading/unpacking scipy
C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\_vendor\requests\packages\urllib3\connectionpool.py:1: DeprecationWarning: object.__new__() takes no para
meters
# urllib3/connectionpool.py
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement scipy
Cleaning up...
No distributions at all found for scipy
Any help on how to get it to work will be appreciated. Alternatively, if there are other ways to easily install newer compiled version of scipy on IronPython env, it's also OK - I just need to know.

Getting scipy to work in cygwin

I know that others have struggled with this problem, but I don't know what I'm doing wrong. I have installed anything I can see related to gcc, BLAS, or LAPACK in the cygwin packages window, but I still get a long list of errors when I do pip install scipy. I see things like
Running from scipy source directory.
Splitting linalg.interpolative Fortran source files
blas_opt_info:
blas_mkl_info:
libraries mkl,vml,guide not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
NOT AVAILABLE
openblas_info:
libraries openblas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
NOT AVAILABLE
The last error I see is:
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-8lzrOH/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-nzff
hk-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-8lzrOH/scipy
Can someone help me out with this? Numpy is working without any problems.
In Cygwin Setup, install liblapack-devel (openblas will come as dependency). Then you can install scipy with pip install scipy.

Dynare Installing problems: umfpack

I'm trying to compile dynare 4.4.2 on my rosa linux r3 (64bit) for matlab R2013a. The configure step is
./configure --with-matlab=/media/Docs/Studium/matlab MATLAB_VERSION=8.1
But I'm getting the error
configure: error: Can't find UMFPACK
configure: error: ./configure failed for mex/build/octave
I've been trying it with
--with-umfpack=/usr/include/suitesparse
, but the error is still remaining.
Umfpack is installed (lib64umfpack-devel, lib64umfpack5.6.1 packages), so I have no idea what to do. Any ideas? Thanks in advance!

Error when trying to use mexopencv in matlab

I am trying to use mexopencv on my system which has:
Ubuntu 12.04.1 LTS
opencv 2.4.2
gcc-4.4
matlab 2012
and they all are working. I also used some c++ codes to test mex and it worked fine.
I used this to install mexopencv. Also did this because of some error I got which mentioned libstdc++.so.6
Now when I try something like:
a = cv.imread('pic.jpg');
I get:
Error using cv.imread
Invalid MEX-file '/home/primepc09/mexopencv/+cv/imread.mexa64': /usr/local/lib/libopencv_highgui.so.2.4:
undefined symbol: _ZNK9QCheckBox15minimumSizeHintEv
Any idea why I get this?
This is an unresolved symbol from QT library. Make sure you have QT installed on your system:
sudo dpkg -l | grep libqt
If you don't have it, you need to install it.