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

Windows Visual Studio error with Eigen #69

Closed
resonance20 opened this issue Jun 26, 2018 · 10 comments
Closed

Windows Visual Studio error with Eigen #69

resonance20 opened this issue Jun 26, 2018 · 10 comments

Comments

@resonance20
Copy link

resonance20 commented Jun 26, 2018

I get the following error with python 3.6.4 on windows 10 while using pip install:

Collecting pydensecrf
  Using cached https://files.pythonhosted.org/packages/31/5a/1c2ab48e8019d282c128bc5c621332267bb954d32eecdda3ba57306b1551/pydensecrf-1.0rc3.tar.gz
Building wheels for collected packages: pydensecrf
  Running setup.py bdist_wheel for pydensecrf ... error
  Complete output from command c:\users\brain\miniconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\brain\\AppData\\Local\\Temp\\pip-install-wj25x65h\\pydensecrf\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\brain\AppData\Local\Temp\pip-wheel-r3h92lnu --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.6
  creating build\lib.win-amd64-3.6\pydensecrf
  copying pydensecrf\utils.py -> build\lib.win-amd64-3.6\pydensecrf
  copying pydensecrf\__init__.py -> build\lib.win-amd64-3.6\pydensecrf
  running build_ext
  building 'pydensecrf.eigen' extension
  creating build\temp.win-amd64-3.6
  creating build\temp.win-amd64-3.6\Release
  creating build\temp.win-amd64-3.6\Release\pydensecrf
  C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ipydensecrf/densecrf/include -Ipydensecrf -Ic:\users\brain\miniconda3\include -Ic:\users\brain\miniconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\cppwinrt" /EHsc /Tppydensecrf/eigen.cpp /Fobuild\temp.win-amd64-3.6\Release\pydensecrf/eigen.obj
  eigen.cpp
  c:\users\brain\appdata\local\temp\pip-install-wj25x65h\pydensecrf\pydensecrf\densecrf\include\eigen\src/Core/VectorBlock.h(120): error C2373: 'Eigen::DenseBase<Derived>::segment': redefinition; different type modifiers
  c:\users\brain\appdata\local\temp\pip-install-wj25x65h\pydensecrf\pydensecrf\densecrf\include\eigen\src/Core/DenseBase.h(291): note: see declaration of 'Eigen::DenseBase<Derived>::segment'
  c:\users\brain\appdata\local\temp\pip-install-wj25x65h\pydensecrf\pydensecrf\densecrf\include\eigen\src/Core/VectorBlock.h(121): error C2447: '{': missing function header (old-style formal list?)
  c:\users\brain\appdata\local\temp\pip-install-wj25x65h\pydensecrf\pydensecrf\densecrf\include\eigen\src/Core/VectorBlock.h(152): error C2373: 'Eigen::DenseBase<Derived>::head': redefinition; different type modifiers
  c:\users\brain\appdata\local\temp\pip-install-wj25x65h\pydensecrf\pydensecrf\densecrf\include\eigen\src/Core/DenseBase.h(294): note: see declaration of 'Eigen::DenseBase<Derived>::head'
  c:\users\brain\appdata\local\temp\pip-install-wj25x65h\pydensecrf\pydensecrf\densecrf\include\eigen\src/Core/VectorBlock.h(153): error C2447: '{': missing function header (old-style formal list?)
  c:\users\brain\appdata\local\temp\pip-install-wj25x65h\pydensecrf\pydensecrf\densecrf\include\eigen\src/Core/VectorBlock.h(184): error C2373: 'Eigen::DenseBase<Derived>::tail': redefinition; different type modifiers
  c:\users\brain\appdata\local\temp\pip-install-wj25x65h\pydensecrf\pydensecrf\densecrf\include\eigen\src/Core/DenseBase.h(297): note: see declaration of 'Eigen::DenseBase<Derived>::tail'
  c:\users\brain\appdata\local\temp\pip-install-wj25x65h\pydensecrf\pydensecrf\densecrf\include\eigen\src/Core/VectorBlock.h(185): error C2447: '{': missing function header (old-style formal list?)
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.13.26128\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
@lucasb-eyer
Copy link
Owner

We regularly get reports about difficulties on Windows. I personally can't help unfortunately, as I don't have access to windows anymore, but any PRs are welcome.

@resonance20
Copy link
Author

Do you use a custom version of the eigen library here or is it a standard release? If standard, which version?

@resonance20
Copy link
Author

Okay I found that using conda to install this library worked. Go figure.

@lucasb-eyer
Copy link
Owner

Thank you for getting back, I have added a note to the README.

@Tyllis
Copy link

Tyllis commented Sep 14, 2018

I had the exact same issue on Window 10.
Resolved by running conda install -c conda-forge pydensecrf
https://anaconda.org/conda-forge/pydensecrf

@yzaretskiy
Copy link

yzaretskiy commented Oct 1, 2018

In case folks don't want to use conda, I was able to resolve this particular issue by cloning the master branch, replacing the included Eigen library with its most recent version (3.3.5 as of today), and then installing pydensecrf with python setup.py install.

@tansyl
Copy link

tansyl commented May 10, 2019

Hi @lucasb-eyer , after looking through all the related threads, updating Eigen library to a newer version solved my case (I used 3.3.5). would you please update the package included or add a note to the README? I feel that it might eliminate the remaining windows installation issues. Thanks!

@mohammadreza-sheykhmousa

I had the exact same issue on Window 10.
Resolved by running conda install -c conda-forge pydensecrf
https://anaconda.org/conda-forge/pydensecrf

Thanks @Tyllis this solved my problem as well.

@daddydrac
Copy link

Conda install fails ->

Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

@ElonGaties
Copy link

@salinaaaaaa did you fix that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants