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

Pylada-light installation error #54

Open
nhjkjh0608 opened this issue Dec 26, 2019 · 4 comments
Open

Pylada-light installation error #54

nhjkjh0608 opened this issue Dec 26, 2019 · 4 comments

Comments

@nhjkjh0608
Copy link

Hi I am trying to install pylada-light

When I entered pip3 install git+https://github.com/pylada/pylada-light --user,
an error appeared below.

Installing collected packages: pylada
Running setup.py install for pylada: started
Running setup.py install for pylada: finished with status 'error'
CMake Warning (dev) at build/external/src/GreatCMakeCookOff/cmake/GreatCMakeCookOffConfig.cmake:6 (set):
implicitly converting 'DOC' to 'STRING' type.
Call Stack (most recent call first):
cmake_modules/LookUp-GreatCMakeCookOff.cmake:13 (find_package)
CMakeLists.txt:31 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Found Eigen3
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pip-req-build-mg7bw46u/build
CMake: building in /tmp/pip-req-build-mg7bw46u/build
/home/jaehyeon/opt/cmake-3.16.2/bin/cmake --build /tmp/pip-req-build-mg7bw46u/build
[  0%] Built target lookup_dependencies
[  0%] Built target pylada_error
[  8%] Built target pylada.crystal._map_sites-cython
[ 20%] Built target cutilities
[ 28%] Built target pylada.crystal.cutilities-cython
[ 37%] Built target pylada.crystal._primitive-cython
[ 45%] Built target pylada.crystal._coordination_shells-cython
[ 54%] Built target pylada.crystal._space_group-cython
[ 54%] Built target pylada.crystal
[ 57%] Building CXX object crystal/defects/CMakeFiles/third_order.dir/third_order.cc.o
/tmp/pip-req-build-mg7bw46u/crystal/defects/third_order.cc: In function ‘pylada::types::t_real pylada::third_order(const Eigen::MatrixBase<Derived>&, pylada::types::t_int)’:
/tmp/pip-req-build-mg7bw46u/crystal/defects/third_order.cc:43:26: error: ‘v’ does not name a type
               auto const v = rVector3d(i * ninv + l - 0.5, j * ninv + m - 0.5, k * ninv + n - 0.5);
                          ^
/tmp/pip-req-build-mg7bw46u/crystal/defects/third_order.cc:44:43: error: ‘v’ was not declared in this scope
               t_real const q = (_matrix * v).squaredNorm();
                                           ^
/tmp/pip-req-build-mg7bw46u/crystal/defects/third_order.cc: In function ‘pylada::types::t_real pylada::third_order(const t_real*, pylada::types::t_int)’:
/tmp/pip-req-build-mg7bw46u/crystal/defects/third_order.cc:56:14: error: ‘matrix’ does not name a type
   auto const matrix = types::rMatrix3d::Map(_matrix).transpose();
              ^
/tmp/pip-req-build-mg7bw46u/crystal/defects/third_order.cc:57:22: error: ‘matrix’ was not declared in this scope
   return third_order(matrix, _n);
                      ^
gmake[2]: *** [crystal/defects/CMakeFiles/third_order.dir/third_order.cc.o] Error 1
gmake[1]: *** [crystal/defects/CMakeFiles/third_order.dir/all] Error 2
gmake: *** [all] Error 2
error: command '/home/jaehyeon/opt/cmake-3.16.2/bin/cmake' failed with exit status 2
----------------------------------------

ERROR: Command "/TGM/Apps/PYTHON/3.6.6_ICC18.0.3/bin/python3.6 -u -c 'import setuptools, tokenize;file='"'"'/tmp/pip-req-build-mg7bw46u/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-vze59oc4/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-req-build-mg7bw46u/

May I ask you solution for this error??

My python version: 3.6.6
cmake version: 3.16.2

@nhjkjh0608
Copy link
Author

I also tried with python2.7 and an error still appeared

@mdavezac
Copy link
Member

mdavezac commented Jan 6, 2020

Could you check the compiler supports C++11?

@ftherrien
Copy link
Member

ftherrien commented Feb 20, 2020

I have been having the same issue when installing pylada on clusters that have somewhat old versions of the compilers. I think @mdavezac is right, forcing the c++11 standard solves the issue for me:

CXXFLAGS="-std=c++11" pip3 install git+https://github.com/pylada/pylada-light --user

@mdavezac should we add this to the c++ flags in setup.py? (I don't know much about cmake so I am not sure where exactly)

@mdavezac
Copy link
Member

I'm not too keen on adding hard-coded flags. They might make other setup fail.
I think the issue might actually be the version of CMake. There's a branch where I'm trying to clean this up, but it's not quite ready yet.

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

3 participants