matplotlib in python 2.7 virtualenv on FreeBSD 11

fwyKKCkQze2z

Member

Reaction score: 1
Messages: 40

Hi Forum

I am trying to install matplotlib in a Python 2.7.15 virtualenv (created using virtualenvwrapper) on FreeBSD 11-RELEASE system.
It seems that I am running in a somewhat known problem with the installation of numpy (cf. the edit in post #3 of "Matplotlib python3 anyone?" [1]).

After a first failed try when the error claimed that freetype was not found, I ran pkg install pkgconf as suggested on "Fails to install matplotlib using pip3 on FreeBSD" [2].

It seems that this led to freetype (which was and is installed) to be found now.

But running pip install numpy still throws various errors:
Code:
  cc: /tmp/tmpL7uXKJ/file.c
    libraries mkl_rt not found in ['/usr/home/foo/.virtualenvs/monitoring/lib', '/usr/local/lib', '/usr/lib']
    NOT AVAILABLE
Code:
  cc: /tmp/tmp2Ub9Qb/file.c
    libraries blis not found in ['/usr/home/foo/.virtualenvs/monitoring/lib', '/usr/local/lib', '/usr/lib']
    NOT AVAILABLE
Code:
  //usr/local/lib/gcc7/libgfortran.so.4: undefined reference to `__divtf3@GCC_4.6.0'
  cc: error: linker command failed with exit code 1 (use -v to see invocation)
    NOT AVAILABLE
I am not sure which ones are the (most) relevant errors and I would greatly appreciate if someone could point me into the right direction about how to solve this.
I am happy to provide more information if required.


Best regards
fwy

[1] https://forums.freebsd.org/threads/matplotlib-python3-anyone.56160/post-319281" href="/index.php?threads/https://forums.freebsd.org/threads/matplotlib-python3-anyone.56160/post-319281/">Thread https://forums.freebsd.org/threads/matplotlib-python3-anyone.56160/post-319281
[2] https://stackoverflow.com/a/33944443/254868
 

talsamon

Daemon

Reaction score: 276
Messages: 1,808

Why you not use math/py-numpy from the port?
The problem is this
Code:
math/py-numpy/Makefile

PYDISTUTILS_BUILDARGS=          --fcompiler=gnu95
PYDISTUTILS_CONFIGUREARGS=      --fcompiler=gnu95
or the missing
rpath to the compiler (without it, it does not find fortran).
LDFLAGS=-L/usr/local/lib -Wl,-rpath=/usr/local/lib/gcc7
 
OP
OP
F

fwyKKCkQze2z

Member

Reaction score: 1
Messages: 40

I was (am) under the impression that I cannot use math/py-numpy in a virtualenv. Can I?

BTW: both, pip and setuptools report that their version is up to date.
 
Top