Code Monkey home page Code Monkey logo

Comments (5)

XiaoxingChen avatar XiaoxingChen commented on July 27, 2024 6

Same issue, manually find numpy/arrayobject.h at

/usr/local/lib/python3.5/dist-packages/numpy/core/include

Therefore,

set(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS} /usr/local/lib/python3.5/dist-packages/numpy/core/include)

could be a provisional solution.

from matplotlib-cpp.

joelrorseth avatar joelrorseth commented on July 27, 2024 4

I'm having the same issue on macOS. I've tried linking with Python 2.7 and 3.6 paths. Doesn't work for either. Using homebrew for my 3.6 install.

from matplotlib-cpp.

lava avatar lava commented on July 27, 2024

According to https://packages.ubuntu.com/search?searchon=contents&keywords=numpy%2Farrayobject.h&mode=exactfilename&suite=xenial&arch=any there are three packages for xenial containing this file, if you have installed one of them it should be just a matter of verifying that the include path points to the correct location.

from matplotlib-cpp.

rene-aguirre avatar rene-aguirre commented on July 27, 2024

I'm getting the actual path using this variable in my makefile (fix the python interpreter to python2 or python3 to reflect your installation if needed), OS X Mojave:

NUMPY_INCLUDE := -I$(shell python -c 'import numpy; print(numpy.get_include())')

Also, if using homebrew on Mac OS X try using the python2-config or python3-config script to retrieve --ldflags and --cflags compilation parameters.

Anyway, I'm able to make it work with python2 only (after fixing matplotlibrc backend). I'm having run-time issues when trying to use Python 3.7.x

from matplotlib-cpp.

asharif avatar asharif commented on July 27, 2024

if you used pip2 to install numpy then you should need this flag to g++

-I /usr/local/lib/python2.7/site-packages/numpy/core/include/

from matplotlib-cpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.