xtensor-stack / xtensor-python

Python bindings for xtensor
BSD 3-Clause "New" or "Revised" License
347 stars 58 forks source link

Configuration feedback #74

Closed EelcoHoogendoorn closed 7 years ago

EelcoHoogendoorn commented 7 years ago

running build_ext building 'pyaabbtree' extension C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\Eelco\Miniconda3\envs\pyaabbtree\Include -IC:\Users\Eelco\AppData\ Roaming\Python\Python36\Include -IC:\Users\Eelco\Miniconda3\envs\pyaabbtree\lib\site-packages\numpy\core\include -IC:\Users\Eelco\Dropbox\Git\xtensor\include -IC:\Users\Eelco\Miniconda3\env s\pyaabbtree\include -IC:\Users\Eelco\Miniconda3\envs\pyaabbtree\include -IC:\Users\Eelco\Miniconda3\envs\pyaabbtree\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUD E" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETF XSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include \\winrt" /EHsc /Tpsrc/main.cpp /Fobuild\temp.win-amd64-3.6\Release\src/main.obj /EHsc /DVERSION_INFO=\"0.0.1\" main.cpp c:\users\eelco\dropbox\git\xtensor\include\xtensor\xfunction.hpp(132): error C2039: 'layout_type': is not a member of 'xt::pyarray<double>' src/main.cpp(18): note: see declaration of 'xt::pyarray<double>' src/main.cpp(25): note: see reference to class template instantiation 'xt::xfunction<std::plus<double>,double,const xt::pyarray<double> &,xt::xscalar<const int>>' being compiled c:\users\eelco\dropbox\git\xtensor\include\xtensor\xfunction.hpp(132): error C2065: 'layout_type': undeclared identifier c:\users\eelco\dropbox\git\xtensor\include\xtensor\xfunction.hpp(133): error C2039: 'contiguous_layout': is not a member of 'xt::pyarray<double>' src/main.cpp(18): note: see declaration of 'xt::pyarray<double>' c:\users\eelco\dropbox\git\xtensor\include\xtensor\xfunction.hpp(133): error C2065: 'contiguous_layout': undeclared identifier c:\users\eelco\dropbox\git\xtensor\include\xtensor\xfunction.hpp(133): error C2975: 'B': invalid template argument for 'xt::and_c', expected compile-time constant expression c:\users\eelco\dropbox\git\xtensor\include\xtensor\xutils.hpp(210): note: see declaration of 'B' error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

Am I using incompatible versions of the various packages? Sadly I cant see right away if this is some form of trivial error without familiarizing myself with the codebase first.

SylvainCorlay commented 7 years ago

Thanks for the feedback. I am surprised that you don't see the headers in the conda package

Regarding the use of xtensor from source, I would recommend checking out tags, instead of the tip of master. Master reflects new unreleased features that will require updates in xtensor-python, and from what I see, this is the reason for your error message.

SylvainCorlay commented 7 years ago

Ah, I found an issue with the cookie-cutter:

After os.path.join(sys.prefix, 'include'), please try adding os.path.join(sys.prefix, 'Library', 'include'). Cf https://github.com/QuantStack/xtensor-cookiecutter/pull/5.

I recommend using the conda-packages which reflect stable releases.

EelcoHoogendoorn commented 7 years ago

Ah indeed; library/include is indeed where it is at!

SylvainCorlay commented 7 years ago

Pfiou, closing. Thanks for the feedback.

EelcoHoogendoorn commented 7 years ago

With a footnote: I seem to recall that there are some python2/3 win/linux differences regarding the python directory structure that may be relevant to this, so simply hardcoding the relative path might not work under all circumstances.