CloudCompare / CloudComPy

Python wrapper for CloudCompare
Other
283 stars 40 forks source link

Problem Installing CloudComPy on Ubuntu 20.04 #87

Open trevgilk opened 1 year ago

trevgilk commented 1 year ago

Hi all,

I am having some difficulty installing CloudComPy on my device and was hoping I could get some guidance here. I am operating an Ubuntu 20.04 system with Python 3.9.12 installed.

The commands I have ran so far have been:

Pip3 install pybind11
Pip3 install numpy
Git clone https://github.com/CloudCompare/CloudComPy.git
sudo apt-get install qtbase5-dev python3 libpython3-dev python3-numpy cmake

These have all worked and had no problems. When I ran the following command:

-DPYTHON_PREFERED_VERSION:STRING="3.8" -DPLUGIN_STANDARD_QM3C2:BOOL="1" -DBUILD_PY_TESTING:BOOL="1" -DPYTHONAPI_TEST_DIRECTORY:STRING="/home/lidar/CloudComPy/Data" -DCMAKE_BUILD_TYPE:STRING="RelWithDebInfo" -DCCCORELIB_USE_CGAL:BOOL="1" -DPLUGIN_STANDARD_QRANSAC_SD:BOOL="1" -DPLUGIN_EXAMPLE_IO:BOOL="1" -DCMAKE_INSTALL_PREFIX:PATH="/home/lidar/CloudComPy/installRelease" -DBUILD_TESTING:BOOL="1" -DOPTION_USE_GDAL:BOOL="1" -DPLUGIN_GL_QEDL:BOOL="1" -DPLUGIN_IO_QCSV_MATRIX:BOOL="1" -DPLUGIN_GL_QSSAO:BOOL="1" -DPLUGIN_STANDARD_QPCL:BOOL="0" -DPLUGIN_IO_QADDITIONAL:BOOL="1" -DPLUGIN_STANDARD_QCOMPASS:BOOL="1" -DPLUGIN_STANDARD_QMPLANE:BOOL="1" -DPLUGIN_IO_QPHOTOSCAN:BOOL="1" -DPYTHONAPI_TRACES:BOOL="1" -DPLUGIN_IO_QE57:BOOL="1" -DPLUGIN_STANDARD_QBROOM:BOOL="1" -DPLUGIN_EXAMPLE_STANDARD:BOOL="1" -DPLUGIN_STANDARD_QPOISSON_RECON:BOOL="1" -DPLUGIN_EXAMPLE_GL:BOOL="1"```

I got no output. This may be due to the file paths which don't seem to match the contents of the GitHub repository. I changed them, though, to match my systems file paths. Looking forward into the next steps, file paths which don't match my cloned repository seem to be a recurring issue. I was following the instructions from this GitHub when I ran into this problem. Thank you in advance to anyone who is willing to provide assistance!

prascle commented 1 year ago

Hello, There are only two ways to install CloudComPy:

  1. use the Conda packaging system to install a virtual Python environment for CloudComPy, download a compiled version of CloudComPy here and follow the instructions in the README.
  2. Get the C++ source for CloudComPy (git clone https://github.com/CloudCompare/CloudComPy.git) and rebuild CloudComPy with CMake.

I plan to make a conda package for CloudComPy for a more natural installation. I also considered packaging with Pip (probably more complex). This is not planned yet.

Unless you really need to modify CloudComPy itself or don't want to work with Conda, the first solution is easier than the second, especially if you are not familiar with the process of building from source with CMake. If you are rebuilding CloudComPy, it is easier to rely on the conda packaging environment than to search for all the necessary Ubuntu packages (the list above is far from complete, and not so easy to reconstruct). Also, many plugins require libraries that are not packaged and must be rebuilt from source. Paul