Skip to content

fails to build with local numpy #65

@MaxGaukler

Description

@MaxGaukler

The CMake file only looks in the main python site directory, not in the other directories. Therefore, it fails to find a custom numpy installation via pip, which is however necessary if some other library requires a more recent version of numpy than available from the distribution's (here Ubuntu) packages.

See the following Dockerfile, which should work without the ln -s line, but doesn't.

FROM ubuntu:18.04
RUN apt-get -qy update && apt-get -qy install python3-pip
RUN apt-get -qy install cmake gfortran libopenblas-dev 
RUN pip3 install numpy scikit-build
# BUG: doesn't work without this line:
RUN ln -s /usr/local/lib/python3.6/dist-packages/numpy /usr/lib/python3/dist-packages/numpy  
RUN pip3 install slycot

The correct path to look for numpy (required for the f2py headers) can be determined with:
python3 -c "from os.path import dirname; import numpy; print(dirname(dirname(numpy.__file__)))"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions