Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eigen #64

Closed
steersteer opened this issue Mar 3, 2020 · 13 comments
Closed

Eigen #64

steersteer opened this issue Mar 3, 2020 · 13 comments

Comments

@steersteer
Copy link

Hi,
I'm having trouble with pip install of pygalmesh. I get the error "Cannot open include file: 'Eigen/Dense': No such file or directory" could you please give me some guidance on how I can "install" Eigen3 so I can get this to work please?

@nschloe
Copy link
Collaborator

nschloe commented Mar 3, 2020

You need http://eigen.tuxfamily.org/index.php?title=Main_Page.

On Debian/Ubuntu and derivates, that's as easy as

sudo apt install libeigen3-dev

@steersteer
Copy link
Author

Sorry I should have said I'm on a windows machine

@steersteer
Copy link
Author

I changed the setup.py line "os.environ.get("EIGEN_INCLUDE_DIR", "\Eigen3")" so I get past that now.
I'm now getting "src/generate.cpp(5): fatal error C1083: Cannot open include file: 'CGAL/Exact_predicates_inexact_constructions_kernel.h': No such file or directory"

As far as I know I have the latest CGAL installed

@nschloe
Copy link
Collaborator

nschloe commented Mar 3, 2020

These kind of linking errors are nearly impossible to debug without machine access. You'll have to dig around yourself I'm afraid.

@flothesof
Copy link

Hi,
I've got a little further down the process trying to install pygalmesh on a Windows machine.

I've done the following:

  • install eigen and cgal using conda install -c conda-forge eigen cgal
  • added an environment variable 'EIGEN_INCLUDE_DIR' pointing to 'C:\Anaconda3\envs\py37\Library\include\eigen3'

Then doing pip install pygalmesh I'm now stuck on a compile error, which is:

C:\Anaconda3\envs\py37\Library\include\CGAL/Mesh_criteria_3.h(116): error C2664: 'CGAL::Mesh_cell_criteria_3<Tr,CGAL::Mesh_3::Cell_criteria_visitor_with_features<Tr>>::Mesh_cell_criteria_3(const CGAL::Mesh_cell_criteria_3<Tr,CGAL::Mesh_3::Cell_criteria_visitor_with_features<Tr>> &)'ÿ: impossible de convertir l'argument 2 de 'Arg' en 'const double &'
          with
          [
              Tr=pygalmesh::Tr
          ]
          and
          [
              Arg=const pygalmesh::generate_with_sizing_field::<lambda_db8e64dde8d1efacb3178dd659100057>
          ]
  C:\Anaconda3\envs\py37\Library\include\CGAL/Mesh_criteria_3.h(121): note: Raisonÿ: impossible de convertir de 'Arg' en 'const double'
          with
          [
              Arg=const pygalmesh::generate_with_sizing_field::<lambda_db8e64dde8d1efacb3178dd659100057>
          ]

@nschloe Would you be so kind and translate the meaning of that error message for me?

Thank you

Florian

@nschloe
Copy link
Collaborator

nschloe commented Mar 19, 2020

Looks like an outdated CGAL version.

@flothesof
Copy link

Thanks for your quick reply. Indeed, the CGAL version on conda-forge right now is 4.14 (and they're not quite ready to move to CGAL5, see conda-forge/cgal-feedstock#54). So using conda-forge will likely not work until it provides the latest CGAL version... :(

@nschloe
Copy link
Collaborator

nschloe commented May 2, 2020

@flothesof CGAL seems to be updated on conda-forge now. Any interest in writing a recipe for pygalmesh? Would certainly help a number of people.

@flothesof
Copy link

Thanks for the suggestion. I've just tried the following on my Mac (not Windows) and it installed pygalmesh successfully:

conda install -c conda-forge eigen cgal
export EIGEN_INCLUDE_DIR=/Users/kappamaki/opt/miniconda3/envs/py37/include/eigen3
git clone https://github.com/nschloe/pygalmesh.git
cd pygalmesh
pip intall -e .

When I run pytest after that, I get:

============================================================================= short test summary info =============================================================================
FAILED test/test_inr.py::test_inr - RuntimeError: Caught an unknown exception!
FAILED test/test_remesh_surface.py::test_inr - meshio._exceptions.ReadError
FAILED test/test_volume_from_surface.py::test_volume_from_surface -   File "<string>", line None
========================================================================== 3 failed, 26 passed in 26.44s ==========================================================================

This may or may not work on Windows, but it seems a good basis for trying to make a recipe on conda-forge. I'll give it a shot (I've never done this before).

@nschloe
Copy link
Collaborator

nschloe commented May 2, 2020

I'm also playing around with it rn. #81

@montallban
Copy link

I am on a windows computer. I followed your directions, @flothesof , and got past the Eigen\Dense issue. Now I am hung up on a new one. It seems connected to either my C++ compiler or to CGAL, but I thought CGAL was installed via conda-forge so I don't really know what to do. Any ideas?

Error:

    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I\Users\User\usr\include\eigen-3.3.7\ -IC:\Users\User\AppData\Local\Temp\pip-build-env-cva5itsm\normal\Lib\site-packages\pybind11\include -IC:\Users\User\AppData\Local\Temp\pip-build-env-cva5itsm\normal\Lib\site-packages\pybind11\include -IC:\Users\User\Anaconda3\include -IC:\Users\User\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.7.2\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /EHsc /Tpsrc/generate.cpp /Fobuild\temp.win-amd64-3.7\Release\src/generate.obj -std=c++14
    cl : Command line warning D9002 : ignoring unknown option '-std=c++14'
    generate.cpp
    src/generate.cpp(5): fatal error C1083: Cannot open include file: 'CGAL/Exact_predicates_inexact_constructions_kernel.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.22.27905\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\User\Anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\User\\usr\\include\\pygalmesh\\setup.py'"'"'; __file__='"'"'C:\\Users\\User\\usr\\include\\pygalmesh\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.

@nschloe
Copy link
Collaborator

nschloe commented May 3, 2020

@montallban This is a different issue that OP's. Looks like you don't have recent enough version of CGAL installed. Please open a new issue if you need more instructions. https://www.urbandictionary.com/define.php?term=Thread%20Hijacking

@nschloe
Copy link
Collaborator

nschloe commented May 4, 2020

Let me point everyone towards https://anaconda.org/conda-forge/pygalmesh/. This should make installation on Windows a lot easier.

@nschloe nschloe closed this as completed May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants