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

PEP 517 error when installing with pip #66

Closed
ayberkydn opened this issue Aug 1, 2020 · 18 comments
Closed

PEP 517 error when installing with pip #66

ayberkydn opened this issue Aug 1, 2020 · 18 comments

Comments

@ayberkydn
Copy link

"ERROR: Could not build wheels for pdal which use PEP 517 and cannot be installed directly"

This error message is shown when I try to install PDAL with pip.

The Python and pip versions I tried to install on are;
Python: 3.7 - 3.8
pip: 20.1 - 20.2

I also tried to install virtualenv/conda virtual environments and the system python. Same error message. Not sure if it is a bug or just I am missing something. Tried to google it with no results. Also, pdal 2.1 is installed and working as a command line utility on Arch Linux (installed with pacman).

Here is the full error message:


-- Found Python3: /home/ayb/.local/conda/envs/torch/bin/python3.8 (found version "3.8.3") found components: Interpreter Development NumPy Development.Module Development.Embed                                                             
  CMake Error at CMakeLists.txt:21 (find_package):                                                                                                                                                                                           
    By not providing "FindPDAL.cmake" in CMAKE_MODULE_PATH this project has                                                                                                                                                                  
    asked CMake to find a package configuration file provided by "PDAL", but                                                                                                                                                                 
    CMake did not find one.                                                                                                                                                                                                                  
                                                                                                                                                                                                                                             
    Could not find a package configuration file provided by "PDAL" (requested                                                                                                                                                                
    version 2.1) with any of the following names:                                                                                                                                                                                            
                                                                                                                                                                                                                                             
      PDALConfig.cmake                                                                                                                                                                                                                       
      pdal-config.cmake                                                                                                                                                                                                                      
  
    Add the installation prefix of "PDAL" to CMAKE_PREFIX_PATH or set
    "PDAL_DIR" to a directory containing one of the above files.  If "PDAL"
    provides a separate development package or SDK, be sure it has been
    installed.
  
  
  -- Configuring incomplete, errors occurred!
  See also "/tmp/pip-install-j3gyy3nq/pdal/_skbuild/linux-x86_64-3.8/cmake-build/CMakeFiles/CMakeOutput.log".
    File "/tmp/pip-build-env-bplzf55v/overlay/lib/python3.8/site-packages/skbuild/setuptools_wrap.py", line 582, in setup
      env = cmkr.configure(cmake_args,
    File "/tmp/pip-build-env-bplzf55v/overlay/lib/python3.8/site-packages/skbuild/cmaker.py", line 229, in configure
      raise SKBuildError(
  
  
  --------------------------------------------------------------------------------
  -- Trying "Ninja" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "Ninja" generator - success
  --------------------------------------------------------------------------------
  
  Configuring Project
    Working directory:
      /tmp/pip-install-j3gyy3nq/pdal/_skbuild/linux-x86_64-3.8/cmake-build
    Command:
      cmake /tmp/pip-install-j3gyy3nq/pdal/pdal -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-install-j3gyy3nq/pdal/_skbuild/linux-x86_64-3.8/cmake-install -DPYTHON_EXECUTABLE:FILEPATH=/home/ayb/.local/conda/bin/python -DPYTHON_VERSION_STRING:STRING=3.8.3 -DPYTHON_INCLUDE_DIR:PATH=/home/ayb/.local/conda/include/python3.8 -DPYTHON_LIBRARY:FILEPATH=/home/ayb/.local/conda/lib/libpython3.8.so -DSKBUILD:BOOL=TRUE -DCMAKE_MODULE_PATH:PATH=/tmp/pip-build-env-bplzf55v/overlay/lib/python3.8/site-packages/skbuild/resources/cmake -DCMAKE_BUILD_TYPE:STRING=Release
  
  Traceback (most recent call last):
  
  An error occurred while configuring with CMake.
    Command:
      cmake /tmp/pip-install-j3gyy3nq/pdal/pdal -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-install-j3gyy3nq/pdal/_skbuild/linux-x86_64-3.8/cmake-install -DPYTHON_EXECUTABLE:FILEPATH=/home/ayb/.local/conda/bin/python -DPYTHON_VERSION_STRING:STRING=3.8.3 -DPYTHON_INCLUDE_DIR:PATH=/home/ayb/.local/conda/include/python3.8 -DPYTHON_LIBRARY:FILEPATH=/home/ayb/.local/conda/lib/libpython3.8.so -DSKBUILD:BOOL=TRUE -DCMAKE_MODULE_PATH:PATH=/tmp/pip-build-env-bplzf55v/overlay/lib/python3.8/site-packages/skbuild/resources/cmake -DCMAKE_BUILD_TYPE:STRING=Release
    Source directory:
      /tmp/pip-install-j3gyy3nq/pdal/pdal
    Working directory:
      /tmp/pip-install-j3gyy3nq/pdal/_skbuild/linux-x86_64-3.8/cmake-build
  Please see CMake's output for more information.
  ----------------------------------------
  ERROR: Failed building wheel for pdal
Failed to build pdal
ERROR: Could not build wheels for pdal which use PEP 517 and cannot be installed directly
@hobu
Copy link
Member

hobu commented Aug 2, 2020

As I said in PDAL/PDAL#3201 it looks like the main PDAL library is not installed. Install that first before installing the Python bindings.

@hobu hobu closed this as completed Aug 2, 2020
@ayberkydn
Copy link
Author

I think the main PDAL library is installed, since I am using PDAL in the command line as I mentioned.

>>> pdal --version
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
pdal 2.1.0 (git-version: Release)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Is there something I am possibly missing?

@hobu hobu reopened this Aug 2, 2020
@hobu
Copy link
Member

hobu commented Aug 2, 2020

The Python bindings require the PDAL CMake configuration to be found. I don't know how your PDAL installation in Arch Linux installs that, but the scikit-build stuff in setup.py that uses CMake is not finding it.

What does pdal-config --libs report?

@ayberkydn
Copy link
Author

>>> pdal-config --libs
-L/usr/lib -lpdalcpp

@hobu
Copy link
Member

hobu commented Aug 2, 2020

How about

ls /usr/lib/cmake/PDAL ?

@ayberkydn
Copy link
Author

>>> ls /usr/lib/cmake/PDAL
PDALConfig.cmake  PDALConfigVersion.cmake  PDALTargets.cmake  PDALTargets-noconfig.cmake

@hobu
Copy link
Member

hobu commented Aug 2, 2020

you need to tell CMake where PDAL is it seems. Try something like this:

pip install . -- -DPDAL_DIR=/usr/lib/cmake/

@ayberkydn
Copy link
Author

Seems it solved the error but now I'm getting another one. I'll try to google it first and inform you about it. Thanks a lot for your time!

@hobu
Copy link
Member

hobu commented Aug 2, 2020

Paste it here. The next person who comes along can follow the bread crumbs.

@ayberkydn
Copy link
Author

Oh, right.

  ERROR: Command errored out with exit status 1:
   command: /home/ayb/.local/conda/bin/python /home/ayb/.local/conda/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpyzl1o456                                                                              
       cwd: /tmp/pip-install-w5qxnm0i/pdal                                                                                                                                                                                                   
  Complete output (230 lines):                                                                                                                                                                                                               
  Not searching for unused variables given on the command line.                                                                                                                                                                              
  -- The C compiler identification is GNU 10.1.0                                                                                                                                                                                             
  -- Detecting C compiler ABI info                                                                                                                                                                                                           
  -- Detecting C compiler ABI info - done                                                                                                                                                                                                    
  -- Check for working C compiler: /usr/bin/cc - skipped                                                                                                                                                                                     
  -- Detecting C compile features                                                                                                                                                                                                            
  -- Detecting C compile features - done                                                                                                                                                                                                     
  -- The CXX compiler identification is GNU 10.1.0                                                                                                                                                                                           
  -- Detecting CXX compiler ABI info                                                                                                                                                                                                         
  -- Detecting CXX compiler ABI info - done                                                                                                                                                                                                  
  -- Check for working CXX compiler: /usr/bin/c++ - skipped                                                                                                                                                                                  
  -- Detecting CXX compile features                                                                                                                                                                                                          
  -- Detecting CXX compile features - done                                                                                                                                                                                                   
  -- Configuring done                                                                                                                                                                                                                        
  -- Generating done                                                                                                                                                                                                                         
  -- Build files have been written to: /tmp/pip-install-w5qxnm0i/pdal/_cmake_test_compile/build                                                                                                                                              
  -- The C compiler identification is GNU 10.1.0                                                                                                                                                                                             
  -- The CXX compiler identification is GNU 10.1.0                                                                                                                                                                                           
  -- Detecting C compiler ABI info                                                                                                                                                                                                           
  -- Detecting C compiler ABI info - done                                                                                                                                                                                                    
  -- Check for working C compiler: /usr/bin/cc - skipped                                                                                                                                                                                     
  -- Detecting C compile features                                                                                                                                                                                                            
  -- Detecting C compile features - done                                                                                                                                                                                                     
  -- Detecting CXX compiler ABI info                                                                                                                                                                                                         
  -- Detecting CXX compiler ABI info - done                                                                                                                                                                                                  
  -- Check for working CXX compiler: /usr/bin/c++ - skipped                                                                                                                                                                                  
  -- Detecting CXX compile features                                                                                                                                                                                                          
  -- Detecting CXX compile features - done                                                                                                                                                                                                   
  -- Found Python3: /home/ayb/.local/conda/bin/python3.8 (found version "3.8.3") found components: Interpreter Development NumPy Development.Module Development.Embed                                                                        
  -- Found PythonInterp: /home/ayb/.local/conda/bin/python (found version "3.8.3")                                                                                                                                                           
  -- Found PythonLibs: /home/ayb/.local/conda/lib/libpython3.8.so (found version "3.8.3")                                                                                                                                                    
  -- Found Cython: /home/ayb/.local/conda/bin/cython                                                                                                                                                                                         
  -- The project is built using scikit-build                                                                                                                                                                                                 
  -- Performing Test Weak Link MODULE -> SHARED (gnu_ld_ignore) - Success                                                                                                                                                                    
  _modinit_prefix:PyInit_                                                                                                                                                                                                                    
  -- Looking for pthread.h                                                                                                                                                                                                                   
  -- Looking for pthread.h - found                                                                                                                                                                                                           
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD                                                                                                                                                                                                 
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed                                                                                                                                                                                        
  -- Looking for pthread_create in pthreads                                                                                                                                                                                                  
  -- Looking for pthread_create in pthreads - not found                                                                                                                                                                                      
  -- Looking for pthread_create in pthread                                                                                                                                                                                                   
  -- Looking for pthread_create in pthread - found                                                                                                                                                                                           
  -- Found Threads: TRUE                                                                                                                                                                                                                     
  -- Configuring done                                                                                                                                                                                                                        
  -- Generating done                                                                                                                                                                                                                         
  -- Build files have been written to: /tmp/pip-install-w5qxnm0i/pdal/_skbuild/linux-x86_64-3.8/cmake-build                                                                                                                                  
  [1/36] Building CXX object CMakeFiles/pdal_plugin_reader_numpy.dir/plang/Redirector.cpp.o                                                                                                                                                  
  FAILED: CMakeFiles/pdal_plugin_reader_numpy.dir/plang/Redirector.cpp.o                                                                                                                                                                     
  /usr/bin/c++ -DPDAL_DLL_EXPORT -DPDAL_PYTHON_LIBRARY=\"/home/ayb/.local/conda/lib/libpython3.8.so\" -DWIN32_LEAN_AND_MEAN -Dpdal_plugin_reader_numpy_EXPORTS -Iinclude -I/tmp/pip-install-w5qxnm0i/pdal/pdal/test/gtest/include -I/tmp/pip-install-w5qxnm0i/pdal/pdal/.. -I. -isystem /home/ayb/.local/conda/include/python3.8 -isystem /tmp/pip-build-env-fvsqhaih/overlay/lib/python3.8/site-packages/numpy/core/include -O3 -DNDEBUG -fPIC -std=c++11 -MD -MT CMakeFiles/pdal_plugin_reader_numpy.dir/plang/Redirector.cpp.o -MF CMakeFiles/pdal_plugin_reader_numpy.dir/plang/Redirector.cpp.o.d -o CMakeFiles/pdal_plugin_reader_numpy.dir/plang/Redirector.cpp.o -c /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.cpp   
  In file included from /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.cpp:9:                                                                                                                                                          
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.hpp:37:26: error: ‘std::ostream’ has not been declared                                                                                                                                
     37 |     void set_stdout(std::ostream* ostr);                                                                                                                                                                                           
        |                          ^~~~~~~                                                                                                                                                                                                   
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.hpp:40:37: error: ‘string’ is not a member of ‘std’                                                                                                                                   
     40 |     typedef std::function<void(std::string)> stdout_write_type;                                                                                                                                                                    
        |                                     ^~~~~~                                                                                                                                                                                         
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.hpp:18:1: note: ‘std::string’ is defined in header ‘<string>’; did you forget to ‘#include <string>’?                                                                                 
     17 | #include <Python.h>                                                                                                                                                                                                                
    +++ |+#include <string>                                                                                                                                                                                                                  
     18 |                                                                                                                                                                                                                                    
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.hpp:40:44: error: template argument 1 is invalid                                                                                                                                      
     40 |     typedef std::function<void(std::string)> stdout_write_type;                                                                                                                                                                    
        |                                            ^                                                                                                                                                                                       
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.cpp: In function ‘PyObject* pdal::plang::Stdout_write(PyObject*, PyObject*)’:                                                                                                         
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.cpp:42:28: error: expression cannot be used as a function                                                                                                                             
     42 |         selfimpl->write(str);                                                                                                                                                                                                      
        |                            ^                                                                                                                                                                                                       
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.cpp: At global scope:                                                                                                                                                                 
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.cpp:172:6: error: no declaration matches ‘void pdal::plang::Redirector::set_stdout(std::ostream*)’                                                                                    
    172 | void Redirector::set_stdout(std::ostream* ostr)                                                                                                                                                                                    
        |      ^~~~~~~~~~                                                                                                                                                                                                                    
  In file included from /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.cpp:9:                                                                                                                                                          
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.hpp:44:10: note: candidates are: ‘void pdal::plang::Redirector::set_stdout(pdal::plang::Redirector::stdout_write_type, pdal::plang::Redirector::stdout_flush_type)’                   
     44 |     void set_stdout(stdout_write_type write, stdout_flush_type flush);                                                                                                                                                             
        |          ^~~~~~~~~~                                                                                                                                                                                                                
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.hpp:37:10: note:                 ‘void pdal::plang::Redirector::set_stdout(int*)’                                                                                                     
     37 |     void set_stdout(std::ostream* ostr);                                                                                                                                                                                           
        |          ^~~~~~~~~~                                                                                                                                                                                                                
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.hpp:30:7: note: ‘class pdal::plang::Redirector’ defined here                                                                                                                          
     30 | class Redirector                                                                                                                                                                                                                   
        |       ^~~~~~~~~~                                                                                                                                                                                                                   
  [2/36] Building CXX object CMakeFiles/pdal_io_numpy_test.dir/plang/Redirector.cpp.o                                                                                                                                                        
  FAILED: CMakeFiles/pdal_io_numpy_test.dir/plang/Redirector.cpp.o                                                                                                                                                                           
  /usr/bin/c++ -DPDAL_PYTHON_LIBRARY=\"/home/ayb/.local/conda/lib/libpython3.8.so\" -DWIN32_LEAN_AND_MEAN -I/tmp/pip-install-w5qxnm0i/pdal/pdal/.. -I. -isystem /home/ayb/.local/conda/include/python3.8 -isystem /tmp/pip-install-w5qxnm0i/pdal/pdal/test/gtest/include -isystem /tmp/pip-build-env-fvsqhaih/overlay/lib/python3.8/site-packages/numpy/core/include -isystem /tmp/pip-install-w5qxnm0i/pdal/pdal/test/gtest -O3 -DNDEBUG -std=c++11 -MD -MT CMakeFiles/pdal_io_numpy_test.dir/plang/Redirector.cpp.o -MF CMakeFiles/pdal_io_numpy_test.dir/plang/Redirector.cpp.o.d -o CMakeFiles/pdal_io_numpy_test.dir/plang/Redirector.cpp.o -c /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.cpp                           
  In file included from /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.cpp:9:                                                                                                                                                          
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.hpp:37:26: error: ‘std::ostream’ has not been declared                                                                                                                                
     37 |     void set_stdout(std::ostream* ostr);                                                                                                                                                                                           
        |                          ^~~~~~~                                                                                                                                                                                                   
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.hpp:40:37: error: ‘string’ is not a member of ‘std’                                                                                                                                   
     40 |     typedef std::function<void(std::string)> stdout_write_type;                                                                                                                                                                    
        |                                     ^~~~~~                                                                                                                                                                                         
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.hpp:18:1: note: ‘std::string’ is defined in header ‘<string>’; did you forget to ‘#include <string>’?                                                                                 
     17 | #include <Python.h>                                                                                                                                                                                                                
    +++ |+#include <string>                                                                                                                                                                                                                  
     18 |                                                                                                                                                                                                                                    
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.hpp:40:44: error: template argument 1 is invalid                                                                                                                                      
     40 |     typedef std::function<void(std::string)> stdout_write_type;                                                                                                                                                                    
        |                                            ^                                                                                                                                                                                       
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.cpp: In function ‘PyObject* pdal::plang::Stdout_write(PyObject*, PyObject*)’:                                                                                                         
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.cpp:42:28: error: expression cannot be used as a function                                                                                                                             
     42 |         selfimpl->write(str);                                                                                                                                                                                                      
        |                            ^                                                                                                                                                                                                       
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.cpp: At global scope:                                                                                                                                                                 
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.cpp:172:6: error: no declaration matches ‘void pdal::plang::Redirector::set_stdout(std::ostream*)’                                                                                    
    172 | void Redirector::set_stdout(std::ostream* ostr)                                                                                                                                                                                    
        |      ^~~~~~~~~~                                                                                                                                                                                                                    
  In file included from /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.cpp:9:                                                                                                                                                          
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.hpp:44:10: note: candidates are: ‘void pdal::plang::Redirector::set_stdout(pdal::plang::Redirector::stdout_write_type, pdal::plang::Redirector::stdout_flush_type)’                   
     44 |     void set_stdout(stdout_write_type write, stdout_flush_type flush);                                                                                                                                                             
        |          ^~~~~~~~~~                                                                                                                                                                                                                
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.hpp:37:10: note:                 ‘void pdal::plang::Redirector::set_stdout(int*)’                                                                                                     
     37 |     void set_stdout(std::ostream* ostr);                                                                                                                                                                                           
        |          ^~~~~~~~~~                                                                                                                                                                                                                
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.hpp:30:7: note: ‘class pdal::plang::Redirector’ defined here                                                                                                                          
     30 | class Redirector                                                                                                                                                                                                                   
        |       ^~~~~~~~~~                                                                                                                                                                                                                   
  [3/36] Building CXX object CMakeFiles/pdal_plugin_filter_python.dir/plang/Redirector.cpp.o                                                                                                                                                 
  FAILED: CMakeFiles/pdal_plugin_filter_python.dir/plang/Redirector.cpp.o                                                                                                                                                                    
  /usr/bin/c++ -DPDAL_DLL_EXPORT -DPDAL_PYTHON_LIBRARY=\"/home/ayb/.local/conda/lib/libpython3.8.so\" -DWIN32_LEAN_AND_MEAN -Dpdal_plugin_filter_python_EXPORTS -I/tmp/pip-install-w5qxnm0i/pdal/pdal/test/gtest/include -I/tmp/pip-install-w5qxnm0i/pdal/pdal/.. -I. -Iinclude -isystem /home/ayb/.local/conda/include/python3.8 -isystem /tmp/pip-build-env-fvsqhaih/overlay/lib/python3.8/site-packages/numpy/core/include -O3 -DNDEBUG -fPIC -std=c++11 -MD -MT CMakeFiles/pdal_plugin_filter_python.dir/plang/Redirector.cpp.o -MF CMakeFiles/pdal_plugin_filter_python.dir/plang/Redirector.cpp.o.d -o CMakeFiles/pdal_plugin_filter_python.dir/plang/Redirector.cpp.o -c /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.cpp                                                                                                                                                                                                                                            
  In file included from /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.cpp:9:                                                                                                                                                          
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.hpp:37:26: error: ‘std::ostream’ has not been declared                                                                                                                                
     37 |     void set_stdout(std::ostream* ostr);                                                                                                                                                                                           
        |                          ^~~~~~~                                                                                                                                                                                                   
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.hpp:40:37: error: ‘string’ is not a member of ‘std’                                                                                                                                   
     40 |     typedef std::function<void(std::string)> stdout_write_type;                                                                                                                                                                    
        |                                     ^~~~~~                                                                                                                                                                                         
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.hpp:18:1: note: ‘std::string’ is defined in header ‘<string>’; did you forget to ‘#include <string>’?                                                                                 
     17 | #include <Python.h>                                                                                                                                                                                                                
    +++ |+#include <string>                                                                                                                                                                                                                  
     18 |                                                                                                                                                                                                                                    
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.hpp:40:44: error: template argument 1 is invalid                                                                                                                                      
     40 |     typedef std::function<void(std::string)> stdout_write_type;                                                                                                                                                                    
        |                                            ^                                                                                                                                                                                       
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.cpp: In function ‘PyObject* pdal::plang::Stdout_write(PyObject*, PyObject*)’:                                                                                                         
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.cpp:42:28: error: expression cannot be used as a function                                                                                                                             
     42 |         selfimpl->write(str);                                                                                                                                                                                                      
        |                            ^                                                                                                                                                                                                       
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.cpp: At global scope:                                                                                                                                                                 
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.cpp:172:6: error: no declaration matches ‘void pdal::plang::Redirector::set_stdout(std::ostream*)’                                                                                    
    172 | void Redirector::set_stdout(std::ostream* ostr)                                                                                                                                                                                    
        |      ^~~~~~~~~~                                                                                                                                                                                                                    
  In file included from /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.cpp:9:                                                                                                                                                          
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.hpp:44:10: note: candidates are: ‘void pdal::plang::Redirector::set_stdout(pdal::plang::Redirector::stdout_write_type, pdal::plang::Redirector::stdout_flush_type)’                   
     44 |     void set_stdout(stdout_write_type write, stdout_flush_type flush);                                                                                                                                                             
        |          ^~~~~~~~~~                                                                                                                                                                                                                
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.hpp:37:10: note:                 ‘void pdal::plang::Redirector::set_stdout(int*)’                                                                                                     
     37 |     void set_stdout(std::ostream* ostr);                                                                                                                                                                                           
        |          ^~~~~~~~~~                                                                                                                                                                                                                
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.hpp:30:7: note: ‘class pdal::plang::Redirector’ defined here                                                                                                                          
     30 | class Redirector                                                                                                                                                                                                                   
        |       ^~~~~~~~~~                                                                                                                                                                                                                   
  [4/36] Building CXX object CMakeFiles/pdal_plugin_filter_python.dir/plang/Script.cpp.o                                                                                                                                                     
  [5/36] Building CXX object CMakeFiles/pdal_plugin_reader_numpy.dir/plang/Script.cpp.o                                                                                                                                                      
  [6/36] Building CXX object CMakeFiles/pdal_io_numpy_test.dir/plang/Script.cpp.o                                                                                                                                                            
  [7/36] Building CXX object CMakeFiles/pdal_plugin_filter_python.dir/plang/Environment.cpp.o                                                                                                                                                
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Environment.cpp: In lambda function:                                                                                                                                                             
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Environment.cpp:116:9: warning: converting to non-pointer type ‘long int’ from NULL [-Wconversion-null]                                                                                          
    116 |         import_array();                                                                                                                                                                                                            
        |         ^~~~~~~~~~~~                                                                                                                                                                                                               
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Environment.cpp:117:5: warning: control reaches end of non-void function [-Wreturn-type]                                                                                                         
    117 |     };                                                                                                                                                                                                                             
        |     ^                                                                                                                                                                                                                              
  [8/36] Building CXX object CMakeFiles/pdal_plugin_reader_numpy.dir/plang/Environment.cpp.o                                                                                                                                                 
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Environment.cpp: In lambda function:                                                                                                                                                             
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Environment.cpp:116:9: warning: converting to non-pointer type ‘long int’ from NULL [-Wconversion-null]                                                                                          
    116 |         import_array();                                                                                                                                                                                                            
        |         ^~~~~~~~~~~~                                                                                                                                                                                                               
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Environment.cpp:117:5: warning: control reaches end of non-void function [-Wreturn-type]                                                                                                         
    117 |     };                                                                                                                                                                                                                             
        |     ^                                                                                                                                                                                                                              
  [9/36] Building CXX object CMakeFiles/pdal_io_numpy_test.dir/plang/Environment.cpp.o                                                                                                                                                       
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Environment.cpp: In lambda function:                                                                                                                                                             
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Environment.cpp:116:9: warning: converting to non-pointer type ‘long int’ from NULL [-Wconversion-null]                                                                                          
    116 |         import_array();                                                                                                                                                                                                            
        |         ^~~~~~~~~~~~                                                                                                                                                                                                               
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Environment.cpp:117:5: warning: control reaches end of non-void function [-Wreturn-type]                                                                                                         
    117 |     };                                                                                                                                                                                                                             
        |     ^                                                                                                                                                                                                                              
  [10/36] Building CXX object CMakeFiles/pdal_plugin_reader_numpy.dir/plang/Invocation.cpp.o                                                                                                                                                 
  [11/36] Building CXX object CMakeFiles/pdal_io_numpy_test.dir/plang/Invocation.cpp.o                                                                                                                                                       
  [12/36] Building CXX object CMakeFiles/pdal_plugin_filter_python.dir/plang/Invocation.cpp.o                                                                                                                                                
  [13/36] Building CXX object CMakeFiles/pdal_io_numpy_test.dir/test/Support.cpp.o                                                                                                                                                           
  [14/36] Building CXX object CMakeFiles/pdal_plugin_reader_numpy.dir/io/NumpyReader.cpp.o                                                                                                                                                   
  [15/36] Building CXX object CMakeFiles/pdal_filters_python_test.dir/test/Support.cpp.o
  [16/36] Building CXX object CMakeFiles/pdal_io_numpy_test.dir/test/NumpyReaderTest.cpp.o
  [17/36] Building CXX object CMakeFiles/pdal_plugin_filter_python.dir/filters/PythonFilter.cpp.o
  [18/36] Building CXX object CMakeFiles/pdal_filters_python_test.dir/test/PythonFilterTest.cpp.o
  ninja: build stopped: subcommand failed.
    File "/tmp/pip-build-env-fvsqhaih/overlay/lib/python3.8/site-packages/skbuild/setuptools_wrap.py", line 589, in setup
      cmkr.make(make_args, env=env)
    File "/tmp/pip-build-env-fvsqhaih/overlay/lib/python3.8/site-packages/skbuild/cmaker.py", line 496, in make
      raise SKBuildError(
  
  
  --------------------------------------------------------------------------------
  -- Trying "Ninja" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "Ninja" generator - success
  --------------------------------------------------------------------------------
  
  Configuring Project
    Working directory:
      /tmp/pip-install-w5qxnm0i/pdal/_skbuild/linux-x86_64-3.8/cmake-build
    Command:
      cmake /tmp/pip-install-w5qxnm0i/pdal/pdal -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-install-w5qxnm0i/pdal/_skbuild/linux-x86_64-3.8/cmake-install -DPYTHON_EXECUTABLE:FILEPATH=/home/ayb/.local/conda/bin/python -DPYTHON_VERSION_STRING:STRING=3.8.3 -DPYTHON_INCLUDE_DIR:PATH=/home/ayb/.local/conda/include/python3.8 -DPYTHON_LIBRARY:FILEPATH=/home/ayb/.local/conda/lib/libpython3.8.so -DSKBUILD:BOOL=TRUE -DCMAKE_MODULE_PATH:PATH=/tmp/pip-build-env-fvsqhaih/overlay/lib/python3.8/site-packages/skbuild/resources/cmake -DCMAKE_BUILD_TYPE:STRING=Release
  
  Traceback (most recent call last):
  
  An error occurred while building with CMake.
    Command:
      cmake --build . --target install --config Release --
    Source directory:
      /tmp/pip-install-w5qxnm0i/pdal
    Working directory:
      /tmp/pip-install-w5qxnm0i/pdal/_skbuild/linux-x86_64-3.8/cmake-build
  Please see CMake's output for more information.
  ----------------------------------------
  ERROR: Failed building wheel for pdal

@hobu
Copy link
Member

hobu commented Aug 2, 2020

 -- The C compiler identification is GNU 10.1.0                                                                                                                                                                                             
  -- The CXX compiler identification is GNU 10.1.0    
  In file included from /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.cpp:9:                                                                                                                                                          
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.hpp:37:26: error: ‘std::ostream’ has not been declared                                                                                                                                
     37 |     void set_stdout(std::ostream* ostr);                                                                                                                                                                                           
        |                          ^~~~~~~                                                                                                                                                                                                   
  /tmp/pip-install-w5qxnm0i/pdal/pdal/plang/Redirector.hpp:40:37: error: ‘string’ is not a member of ‘std’                                                                                                                                   
     40 |     typedef std::function<void(std::string)> stdout_write_type;                                                                                                                                                                    
        |                                     ^~~~~~                         

Your compiler is super new, and it must be more strict about includes. These complaints are due to some assumptions about what is system-included in older compiler setups. I can't offer you much to get past this other than to try an older compiler or try to use clang which might maybe support the older behavior.

We can fix these issues up for a newer release, but that will be a while.

Alternatively, if you're willing to use conda, you can get a conda environment with all of this installed. It is one path to success not blocked by waiting on a patch from us.

@ayberkydn
Copy link
Author

I see, I was thinking to fallback to conda but its many-hours-long environment solving times possibly caused by conda-forge repository each time I install a library was setting me back. Thanks a lot!

@hobu
Copy link
Member

hobu commented Aug 2, 2020

many-hours-long environment solving time

Make sure to create new environments for every task and this should be greatly reduced. Every install you add to an environment adds to the solve complexity.

@hobu
Copy link
Member

hobu commented Aug 5, 2020

Please try 2.3.4 and reopen if this is still an issue.

@WangZhenhuaFirst
Copy link

WangZhenhuaFirst commented Dec 30, 2022

I have use conda to install pdal, but I only can see pdal in conda's base environment, I can't see pdal in linux.why?
DC1A91E3-DD60-4BD6-8FAA-B2996C62BCB3
BD0522A7-18A4-4332-8688-1EC455656760
3D94B0D1-2259-4365-938B-AE4E4FFE0491

@UralmashFox
Copy link

UralmashFox commented Jun 23, 2023

you need to tell CMake where PDAL is it seems. Try something like this:

pip install . -- -DPDAL_DIR=/usr/lib/cmake/

@hobu can you tell, how this command should be ran? I'm trying somehting like pip install pdal -- -DPDAL_DIR=/usr/lib/cmake/ and obviously it does not work.

@hobu
Copy link
Member

hobu commented Jun 23, 2023

I'm trying somehting like pip install pdal -- -DPDAL_DIR=/usr/lib/cmake/ and obviously it does not work.

Need to see logs or we're just guessing.

@mfgbse
Copy link

mfgbse commented Oct 26, 2023

@hobu also getting error when running this code, not sure if this is also the error that @UralmashFox got:

pip install . -- -DPDAL_DIR=/usr/lib/cmake/

This is the error I got:
Defaulting to user installation because normal site-packages is not writeable
ERROR: Directory '.' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.

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

5 participants