CloudCompare / CloudComPy

Python wrapper for CloudCompare
Other
281 stars 39 forks source link

a simple test with C2C command after installing cloudComPy #32

Closed antoinebio closed 2 years ago

antoinebio commented 2 years ago

hello I have followed the guideline to install the package with anaconda3 following that post https://github.com/CloudCompare/CloudComPy/blob/master/doc/BuildWindowsConda.md#build-on-windows-10-with-anaconda3-or-miniconda

When I launch a simple code like attached, I've got the following error. Any idea of my mistake ?

Capture

code import cloud1ComPy as cc # import the CloudComPy module cc.initCC() # to do once before dealing with plugins

cloud1 = cc.loadPointCloud("C:\Users\billault.ATGT.001\Documents__TRASH\test\MMS_SNCF\perline\line1.laz") # read the first point cloud1 from a file print("first cloud name: %s"%cloud1.getName())

cloud2 = cc.loadPointCloud("C:\Users\billault.ATGT.001\Documents__TRASH\test\MMS_SNCF\perline\line2.laz") # read the first point cloud1 from a file print("second cloud name: %s"%cloud2.getName())

res=DistanceComputationTools(cloud1,cloud2,maxSearchDist=1) # compute C2C between the 2 ptsclouds

res=cc.SavePointCloud(filteredCloud,"C:\Users\billault.ATGT.001\Documents__TRASH\test\MMS_SNCF\perline\myC2C_Cloud.bin")

prascle commented 2 years ago

Hello,

I think this link provides a solution to something similar. My suggestion is to try the following options: cloud1 = cc.loadPointCloud(r"C:\Users\billault.ATGT.001\Documents__TRASH\test\MMS_SNCF\perline\line1.laz") # read the first point cloud1 from a file or cloud1 = cc.loadPointCloud("C:/Users/billault.ATGT.001/Documents__TRASH/test/MMS_SNCF/perline/line1.laz") # read the first point cloud1 from a file In the first one the 'r' before the string tells Python to use the string as a raw string, without escape characters The second one, with Unix separators '/' instead of Windows '\' is the one I use.

Paul

prascle commented 2 years ago

Ah! the escape character strikes again! The last line in my previous comment is:

The second one, with Unix separators '/' instead of Windows '\' is the one I use.

Paul

antoinebio commented 2 years ago

ok that's right thank you paul. now the pb is more serious. image

I thought it was only with those steps that we install CloudComPy

conda update -y -n base -c defaults conda conda activate conda create -y --name CloudComPy39 python=3.9

--- erase previous env if existing

conda activate CloudComPy39 conda config --add channels conda-forge conda config --set channel_priority strict conda install -y boost cgal cmake ffmpeg gdal jupyterlab matplotlib mysql numpy opencv openmp pcl pdal psutil qt scipy sphinx_rtd_theme spyder tbb tbb-devel xerces-c

prascle commented 2 years ago

I am not sure to understand the problem. You need a conda environment, and an install of the cloudComPy binary.

I suppose you have downloaded a cloudComPy Windows binary from here, and you are reading the instructions on using CloudComPy on Windows with a conda environment, here.

When you create a Conda environment with the instructions conda create -y --name CloudComPy39 python=3.9 the comment # --- erase previous env if existing is a warning related only to the conda environment CloudComPy39, to avoid loosing something if you have modifed the environment for another use.

The whole process of creating a conda environment is quite long (20 ~ 30 mn) so, if you have already created it recently, it is not necessary to restart from scratch. To be sure your conda environment is ok just execute :

conda activate CloudComPy39
conda config --add channels conda-forge
conda config --set channel_priority strict
conda install boost cgal cmake ffmpeg gdal jupyterlab matplotlib mysql numpy opencv openmp pcl pdal psutil qt scipy sphinx_rtd_theme spyder tbb tbb-devel xerces-c

Besides, you still need to download a cloudComPy Windows Binary and install it somewhere, and follow the instructions here. If The Python from conda can't find cloudComPy, maybe there is something wrong with the path and pythonpath. From the conda prompt:

conda activate CloudComPy39
cd <path install>\CloudComPy39
envCloudComPy.bat

The conda prompt (or conda console, or terminal) is in the list of applications installed with conda (I am not working on Windows now, I don't remember the exact name of the application...) but I suppose you are already using it.

I hope you will find the missing step and there is nothing more complicated... Paul

antoinebio commented 2 years ago

sorry I simply copy paste all the required installation steps. of course i didn't use # --- erase previous env if existing so yes , i guess i missed to download a cloudComPy Windows Binary

antoinebio commented 2 years ago

ok so after having installed the windows binary and in conda console I typed conda activate CloudComPy39 cd \CloudComPy39 envCloudComPy.bat

so back to that test.py when I execute the python file image

I will test the example code in CloudComPy/doc/UseWindowsCondaBinary.md just to see if it works well

antoinebio commented 2 years ago

I cannot execute CloudCOmpare in my terminal there is a Gdal error returned

Gdal is already installed in another env in my anaconda... Does cloudComPy required GDAL in the same env (I mean CloudComPy39 env ) ?

image

prascle commented 2 years ago

Each conda environment is fully isolated from the others. Your conda environment CloudComPy39 should be defined completely with the full list of packages in the install command, even if you have already installed some packages in other environments.

Paul

antoinebio commented 2 years ago

THank you Paul for your patience. I aam really sorry but I don't catch the reason of that remaining issue with the lib.. I tried again, with anaconda prompt I also tested if all the package were well installed (see below)

image

even with that , I cannot test the command CloudCompare.exe (I try to launch CC GUI) and any python script failed with an error trying to find DLL of CloudCompPy lib...

antoinebio commented 2 years ago

also in that command conda install boost cgal cmake ffmpeg gdal jupyterlab matplotlib mysql numpy opencv openmp pcl pdal psutil qt scipy sphinx_rtd_theme spyder tbb tbb-devel xerces-c

I cannot See GDAL being installed. You mentionned it was required (?)

prascle commented 2 years ago

In the conda environment, try: conda list to see all the packages installed in this environment. In the sources on GitHub, there is a result of this command, in building directory, if I remember well. Small differences are normal. Maybe there is something missing elsewhere in your system...

Le mar. 29 mars 2022, 11:04, antoine @.***> a écrit :

also in that command conda install boost cgal cmake ffmpeg gdal jupyterlab matplotlib mysql numpy opencv openmp pcl pdal psutil qt scipy sphinx_rtd_theme spyder tbb tbb-devel xerces-c

I cannot See GDAL being installed. You mentionned it was required (?)

— Reply to this email directly, view it on GitHub https://github.com/CloudCompare/CloudComPy/issues/32#issuecomment-1081617183, or unsubscribe https://github.com/notifications/unsubscribe-auth/APFRPQZ6Y2ZXBML3PULDLZDVCLBSDANCNFSM5R337XRQ . You are receiving this because you commented.Message ID: @.***>

antoinebio commented 2 years ago

this is my package in that cloudComPy39 env

packages in environment at C:\ProgramData\Anaconda3\envs\cloudComPy39:

#

Name Version Build Channel

alabaster 0.7.12 py_0 conda-forge anyio 3.5.0 py39hcbf5309_0 conda-forge argh 0.26.2 pyh9f0ad1d_1002 conda-forge argon2-cffi 21.3.0 pyhd8ed1ab_0 conda-forge argon2-cffi-bindings 21.2.0 py39hb82d6ee_1 conda-forge arrow 1.2.2 pyhd8ed1ab_0 conda-forge astroid 2.11.1 py39hcbf5309_0 conda-forge atomicwrites 1.4.0 pyh9f0ad1d_0 conda-forge attrs 21.4.0 pyhd8ed1ab_0 conda-forge autopep8 1.6.0 pyhd8ed1ab_1 conda-forge babel 2.9.1 pyh44b312d_0 conda-forge backcall 0.2.0 pyh9f0ad1d_0 conda-forge backports 1.0 py_2 conda-forge backports.functools_lru_cache 1.6.4 pyhd8ed1ab_0 conda-forge bcrypt 3.2.0 py39hb82d6ee_2 conda-forge beautifulsoup4 4.10.0 pyha770c72_0 conda-forge binaryornot 0.4.4 py_1 conda-forge black 22.1.0 pyhd8ed1ab_0 conda-forge bleach 4.1.0 pyhd8ed1ab_0 conda-forge blosc 1.21.0 h0e60522_0 conda-forge boost 1.74.0 py39hefe7e4c_5 conda-forge boost-cpp 1.74.0 h9f4b32c_7 conda-forge brotli 1.0.9 h8ffe710_6 conda-forge brotli-bin 1.0.9 h8ffe710_6 conda-forge brotlipy 0.7.0 py39hb82d6ee_1003 conda-forge bzip2 1.0.8 h8ffe710_4 conda-forge ca-certificates 2021.10.8 h5b45459_0 conda-forge cairo 1.16.0 h15b3021_1010 conda-forge certifi 2021.10.8 py39hcbf5309_1 conda-forge cffi 1.15.0 py39h0878f49_0 conda-forge cfitsio 4.1.0 h5a969a9_0 conda-forge cgal 5.4 py39h2e25243_0 conda-forge cgal-cpp 5.4 h3c2f9b9_0 conda-forge chardet 4.0.0 py39hcbf5309_2 conda-forge charset-normalizer 2.0.12 pyhd8ed1ab_0 conda-forge click 8.0.4 py39hcbf5309_0 conda-forge cloudpickle 2.0.0 pyhd8ed1ab_0 conda-forge cmake 3.22.3 h39d44d4_0 conda-forge colorama 0.4.4 pyh9f0ad1d_0 conda-forge cookiecutter 1.7.3 pyh6c4a22f_1 conda-forge cryptography 36.0.2 py39h7bc7c5c_0 conda-forge curl 7.82.0 h789b8ee_0 conda-forge cycler 0.11.0 pyhd8ed1ab_0 conda-forge dataclasses 0.8 pyhc8e2a94_3 conda-forge debugpy 1.5.1 py39h415ef7b_0 conda-forge decorator 5.1.1 pyhd8ed1ab_0 conda-forge defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge diff-match-patch 20200713 pyh9f0ad1d_0 conda-forge dill 0.3.4 pyhd8ed1ab_0 conda-forge docutils 0.17.1 py39hcbf5309_1 conda-forge double-conversion 3.2.0 h0e60522_0 conda-forge draco 1.5.2 h5362a0b_0 conda-forge eigen 3.4.0 h2d74725_0 conda-forge entrypoints 0.4 pyhd8ed1ab_0 conda-forge expat 2.4.7 h39d44d4_0 conda-forge ffmpeg 4.3.1 ha925a31_0 conda-forge flake8 4.0.1 pyhd8ed1ab_2 conda-forge flann 1.9.1 h075982a_1010 conda-forge flit-core 3.7.1 pyhd8ed1ab_0 conda-forge font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge font-ttf-inconsolata 3.000 h77eed37_0 conda-forge font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge font-ttf-ubuntu 0.83 hab24e00_0 conda-forge fontconfig 2.13.96 hce3cb01_2 conda-forge fonts-conda-ecosystem 1 0 conda-forge fonts-conda-forge 1 0 conda-forge fonttools 4.31.2 py39hb82d6ee_0 conda-forge freeglut 3.2.2 h0e60522_1 conda-forge freetype 2.10.4 h546665d_1 conda-forge freexl 1.0.6 ha8e266a_0 conda-forge gdal 3.4.2 py39h3f5efd6_2 conda-forge geos 3.10.2 h39d44d4_0 conda-forge geotiff 1.7.0 h38b14a8_7 conda-forge gettext 0.19.8.1 ha2e2712_1008 conda-forge gl2ps 1.4.2 h0597ee9_0 conda-forge glew 2.1.0 h39d44d4_2 conda-forge hdf4 4.2.15 h0e5069d_3 conda-forge hdf5 1.12.1 nompi_h2a0e4a3_104 conda-forge icu 69.1 h0e60522_0 conda-forge idna 3.3 pyhd8ed1ab_0 conda-forge imagesize 1.3.0 pyhd8ed1ab_0 conda-forge importlib-metadata 4.11.3 py39hcbf5309_0 conda-forge importlib_metadata 4.11.3 hd8ed1ab_0 conda-forge importlib_resources 5.6.0 pyhd8ed1ab_0 conda-forge inflection 0.5.1 pyh9f0ad1d_0 conda-forge intel-openmp 2022.0.0 h57928b3_3663 conda-forge intervaltree 3.0.2 py_0 conda-forge ipykernel 6.9.2 py39h832f523_0 conda-forge ipython 7.32.0 py39hcbf5309_0 conda-forge ipython_genutils 0.2.0 py_1 conda-forge isort 5.10.1 pyhd8ed1ab_0 conda-forge jasper 2.0.33 h77af90b_0 conda-forge jbig 2.1 h8d14728_2003 conda-forge jedi 0.18.1 py39hcbf5309_0 conda-forge jellyfish 0.9.0 py39hb82d6ee_0 conda-forge jinja2 3.1.1 pyhd8ed1ab_0 conda-forge jinja2-time 0.2.0 pyhd8ed1ab_3 conda-forge jpeg 9e h8ffe710_0 conda-forge json5 0.9.5 pyh9f0ad1d_0 conda-forge jsoncpp 1.9.5 h2d74725_1 conda-forge jsonschema 4.4.0 pyhd8ed1ab_0 conda-forge jupyter_client 7.1.2 pyhd8ed1ab_0 conda-forge jupyter_core 4.9.2 py39hcbf5309_0 conda-forge jupyter_server 1.15.6 pyhd8ed1ab_1 conda-forge jupyterlab 3.3.2 pyhd8ed1ab_0 conda-forge jupyterlab_pygments 0.1.2 pyh9f0ad1d_0 conda-forge jupyterlab_server 2.11.0 pyhd8ed1ab_0 conda-forge kealib 1.4.14 h8995ca9_3 conda-forge keyring 23.4.0 py39hcbf5309_2 conda-forge kiwisolver 1.4.0 py39h2e07f2f_0 conda-forge krb5 1.19.3 h1176d77_0 conda-forge lazy-object-proxy 1.7.1 py39hb82d6ee_0 conda-forge lcms2 2.12 h2a16943_0 conda-forge lerc 3.0 h0e60522_0 conda-forge libblas 3.9.0 13_win64_mkl conda-forge libbrotlicommon 1.0.9 h8ffe710_6 conda-forge libbrotlidec 1.0.9 h8ffe710_6 conda-forge libbrotlienc 1.0.9 h8ffe710_6 conda-forge libcblas 3.9.0 13_win64_mkl conda-forge libclang 13.0.1 default_h81446c8_0 conda-forge libcurl 7.82.0 h789b8ee_0 conda-forge libdeflate 1.10 h8ffe710_0 conda-forge libevent 2.1.10 h6a571f8_4 conda-forge libffi 3.4.2 h8ffe710_5 conda-forge libgdal 3.4.2 hc8ef25b_2 conda-forge libglib 2.70.2 h3be07f2_4 conda-forge libiconv 1.16 he774522_0 conda-forge libkml 1.3.0 h9859afa_1014 conda-forge liblapack 3.9.0 13_win64_mkl conda-forge liblapacke 3.9.0 13_win64_mkl conda-forge libnetcdf 4.8.1 nompi_h1cc8e9d_101 conda-forge libogg 1.3.4 h8ffe710_1 conda-forge libopencv 4.5.5 py39h606fa8f_6 conda-forge libpng 1.6.37 h1d00b33_2 conda-forge libpq 14.2 hfcc5ef8_0 conda-forge libprotobuf 3.19.4 h7755175_0 conda-forge librttopo 1.1.0 hb1df466_9 conda-forge libsodium 1.0.18 h8d14728_1 conda-forge libspatialindex 1.9.3 h39d44d4_4 conda-forge libspatialite 5.0.1 h36c16d9_15 conda-forge libssh2 1.10.0 h680486a_2 conda-forge libtheora 1.1.1 h8d14728_1005 conda-forge libtiff 4.3.0 hc4061b1_3 conda-forge libwebp 1.2.2 h57928b3_0 conda-forge libwebp-base 1.2.2 h8ffe710_1 conda-forge libxcb 1.13 hcd874cb_1004 conda-forge libxml2 2.9.12 hf5bbc77_1 conda-forge libzip 1.8.0 hfed4ece_1 conda-forge libzlib 1.2.11 h8ffe710_1014 conda-forge llvm-openmp 8.0.1 h1ad3211_0 conda-forge loguru 0.5.3 py39hcbf5309_3 conda-forge lz4-c 1.9.3 h8ffe710_1 conda-forge m2w64-gcc-libgfortran 5.3.0 6 conda-forge m2w64-gcc-libs 5.3.0 7 conda-forge m2w64-gcc-libs-core 5.3.0 7 conda-forge m2w64-gmp 6.1.0 2 conda-forge m2w64-libwinpthread-git 5.0.0.4634.697f757 2 conda-forge markupsafe 2.1.1 py39hb82d6ee_0 conda-forge matplotlib 3.5.1 py39hcbf5309_0 conda-forge matplotlib-base 3.5.1 py39h581301d_0 conda-forge matplotlib-inline 0.1.3 pyhd8ed1ab_0 conda-forge mccabe 0.6.1 py_1 conda-forge mistune 0.8.4 py39hb82d6ee_1005 conda-forge mkl 2022.0.0 h0e2418a_796 conda-forge mpfr 4.1.0 h8d14728_1 conda-forge mpir 3.0.0 he025d50_1002 conda-forge msys2-conda-epoch 20160418 1 conda-forge munkres 1.1.4 pyh9f0ad1d_0 conda-forge mypy_extensions 0.4.3 py39hcbf5309_4 conda-forge mysql 8.0.28 h57928b3_0 conda-forge mysql-client 8.0.28 hf8b63c5_0 conda-forge mysql-common 8.0.28 h57928b3_0 conda-forge mysql-devel 8.0.28 h57928b3_0 conda-forge mysql-libs 8.0.28 h4d1747d_0 conda-forge mysql-server 8.0.28 h77165ef_0 conda-forge nbclassic 0.3.7 pyhd8ed1ab_0 conda-forge nbclient 0.5.13 pyhd8ed1ab_0 conda-forge nbconvert 6.4.4 py39hcbf5309_0 conda-forge nbformat 5.2.0 pyhd8ed1ab_0 conda-forge nest-asyncio 1.5.4 pyhd8ed1ab_0 conda-forge nitro 2.7.dev6 h39d44d4_5 conda-forge notebook 6.4.10 pyha770c72_0 conda-forge notebook-shim 0.1.0 pyhd8ed1ab_0 conda-forge numpy 1.22.3 py39h6331f09_0 conda-forge numpydoc 1.2 pyhd8ed1ab_0 conda-forge opencv 4.5.5 py39hcbf5309_6 conda-forge openjpeg 2.4.0 hb211442_1 conda-forge openmp 8.0.1 0 conda-forge openssl 1.1.1n h8ffe710_0 conda-forge packaging 21.3 pyhd8ed1ab_0 conda-forge pandoc 2.17.1.1 h57928b3_0 conda-forge pandocfilters 1.5.0 pyhd8ed1ab_0 conda-forge paramiko 2.10.3 pyhd8ed1ab_0 conda-forge parso 0.8.3 pyhd8ed1ab_0 conda-forge pathspec 0.9.0 pyhd8ed1ab_0 conda-forge pcl 1.12.1 h8e4b9db_0 conda-forge pcre 8.45 h0e60522_0 conda-forge pdal 2.4.0 hb9befcd_1 conda-forge pexpect 4.8.0 pyh9f0ad1d_2 conda-forge pickleshare 0.7.5 py_1003 conda-forge pillow 9.0.1 py39ha53f419_2 conda-forge pip 22.0.4 pyhd8ed1ab_0 conda-forge pixman 0.40.0 h8ffe710_0 conda-forge platformdirs 2.5.1 pyhd8ed1ab_0 conda-forge pluggy 1.0.0 py39hcbf5309_2 conda-forge poppler 22.01.0 h24fffdf_2 conda-forge poppler-data 0.4.11 hd8ed1ab_0 conda-forge postgresql 14.2 h1c22c4f_0 conda-forge poyo 0.5.0 py_0 conda-forge proj 9.0.0 h1cfcee9_1 conda-forge prometheus_client 0.13.1 pyhd8ed1ab_0 conda-forge prompt-toolkit 3.0.27 pyha770c72_0 conda-forge psutil 5.9.0 py39hb82d6ee_0 conda-forge pthread-stubs 0.4 hcd874cb_1001 conda-forge ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge pugixml 1.11.4 h0e60522_0 conda-forge py-opencv 4.5.5 py39h832f523_6 conda-forge pycodestyle 2.8.0 pyhd8ed1ab_0 conda-forge pycparser 2.21 pyhd8ed1ab_0 conda-forge pydocstyle 6.1.1 pyhd8ed1ab_0 conda-forge pyflakes 2.4.0 pyhd8ed1ab_0 conda-forge pygments 2.11.2 pyhd8ed1ab_0 conda-forge pylint 2.13.1 pyhd8ed1ab_0 conda-forge pyls-spyder 0.4.0 pyhd8ed1ab_0 conda-forge pynacl 1.5.0 py39hb3671d1_0 conda-forge pyopenssl 22.0.0 pyhd8ed1ab_0 conda-forge pyparsing 3.0.7 pyhd8ed1ab_0 conda-forge pyqt 5.12.3 py39hcbf5309_8 conda-forge pyqt-impl 5.12.3 py39h415ef7b_8 conda-forge pyqt5-sip 4.19.18 py39h415ef7b_8 conda-forge pyqtchart 5.12 py39h415ef7b_8 conda-forge pyqtwebengine 5.12.1 py39h415ef7b_8 conda-forge pyrsistent 0.18.1 py39hb82d6ee_0 conda-forge pysocks 1.7.1 py39hcbf5309_4 conda-forge python 3.9.12 h9a09f29_1_cpython conda-forge python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge python-lsp-black 1.1.0 pyhd8ed1ab_0 conda-forge python-lsp-jsonrpc 1.0.0 pyhd8ed1ab_0 conda-forge python-lsp-server 1.3.3 pyhd8ed1ab_0 conda-forge python-slugify 6.1.1 pyhd8ed1ab_0 conda-forge python_abi 3.9 2_cp39 conda-forge pytz 2022.1 pyhd8ed1ab_0 conda-forge pywin32 303 py39hb82d6ee_0 conda-forge pywin32-ctypes 0.2.0 py39hcbf5309_1004 conda-forge pywinpty 1.1.6 py39h99910a6_0 conda-forge pyyaml 6.0 py39hb82d6ee_3 conda-forge pyzmq 22.3.0 py39he46f08e_1 conda-forge qdarkstyle 3.0.2 pyhd8ed1ab_0 conda-forge qhull 2020.2 h70d2c02_2 conda-forge qstylizer 0.2.1 pyhd8ed1ab_0 conda-forge qt 5.12.9 h556501e_6 conda-forge qtawesome 1.1.1 pyhd8ed1ab_0 conda-forge qtconsole 5.2.2 pyhd8ed1ab_1 conda-forge qtconsole-base 5.2.2 pyhd8ed1ab_1 conda-forge qtpy 2.0.1 pyhd8ed1ab_0 conda-forge requests 2.27.1 pyhd8ed1ab_0 conda-forge rope 0.23.0 pyhd8ed1ab_0 conda-forge rtree 0.9.7 py39h09fdee3_3 conda-forge scipy 1.8.0 py39hc0c34ad_1 conda-forge send2trash 1.8.0 pyhd8ed1ab_0 conda-forge setuptools 61.1.1 py39hcbf5309_0 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge sniffio 1.2.0 py39hcbf5309_2 conda-forge snowballstemmer 2.2.0 pyhd8ed1ab_0 conda-forge sortedcontainers 2.4.0 pyhd8ed1ab_0 conda-forge soupsieve 2.3.1 pyhd8ed1ab_0 conda-forge sphinx 4.4.0 pyh6c4a22f_1 conda-forge sphinx_rtd_theme 1.0.0 pyhd8ed1ab_0 conda-forge sphinxcontrib-applehelp 1.0.2 py_0 conda-forge sphinxcontrib-devhelp 1.0.2 py_0 conda-forge sphinxcontrib-htmlhelp 2.0.0 pyhd8ed1ab_0 conda-forge sphinxcontrib-jsmath 1.0.1 py_0 conda-forge sphinxcontrib-qthelp 1.0.3 py_0 conda-forge sphinxcontrib-serializinghtml 1.1.5 pyhd8ed1ab_1 conda-forge spyder 5.2.2 py39hcbf5309_3 conda-forge spyder-kernels 2.2.1 py39hcbf5309_1 conda-forge sqlite 3.37.1 h8ffe710_0 conda-forge tbb 2021.5.0 h2d74725_0 conda-forge tbb-devel 2021.5.0 h2d74725_0 conda-forge terminado 0.13.3 py39hcbf5309_0 conda-forge testpath 0.6.0 pyhd8ed1ab_0 conda-forge text-unidecode 1.3 py_0 conda-forge textdistance 4.2.2 pyhd8ed1ab_0 conda-forge three-merge 0.1.1 pyh9f0ad1d_0 conda-forge tiledb 2.7.1 h95dad36_0 conda-forge tinycss2 1.1.1 pyhd8ed1ab_0 conda-forge tk 8.6.12 h8ffe710_0 conda-forge toml 0.10.2 pyhd8ed1ab_0 conda-forge tomli 2.0.1 pyhd8ed1ab_0 conda-forge tornado 6.1 py39hb82d6ee_2 conda-forge traitlets 5.1.1 pyhd8ed1ab_0 conda-forge typed-ast 1.5.2 py39hb82d6ee_0 conda-forge typing-extensions 4.1.1 hd8ed1ab_0 conda-forge typing_extensions 4.1.1 pyha770c72_0 conda-forge tzdata 2022a h191b570_0 conda-forge ucrt 10.0.20348.0 h57928b3_0 conda-forge ujson 5.1.0 py39h415ef7b_0 conda-forge unicodedata2 14.0.0 py39hb82d6ee_0 conda-forge unidecode 1.3.4 pyhd8ed1ab_0 conda-forge urllib3 1.26.9 pyhd8ed1ab_0 conda-forge utfcpp 3.2.1 h57928b3_0 conda-forge vc 14.2 hb210afc_6 conda-forge vs2015_runtime 14.29.30037 h902a5da_6 conda-forge vtk 9.1.0 qt_py39h1ab545e_206 conda-forge watchdog 2.1.7 py39hcbf5309_0 conda-forge wcwidth 0.2.5 pyh9f0ad1d_2 conda-forge webencodings 0.5.1 py_1 conda-forge websocket-client 1.3.1 pyhd8ed1ab_0 conda-forge wheel 0.37.1 pyhd8ed1ab_0 conda-forge win32_setctime 1.1.0 pyhd8ed1ab_0 conda-forge win_inet_pton 1.1.0 py39hcbf5309_3 conda-forge wincertstore 0.2 py39hcbf5309_1007 conda-forge winpty 0.4.3 4 conda-forge wrapt 1.14.0 py39hb82d6ee_0 conda-forge xerces-c 3.2.3 h0e60522_4 conda-forge xorg-libxau 1.0.9 hcd874cb_0 conda-forge xorg-libxdmcp 1.1.3 hcd874cb_0 conda-forge xz 5.2.5 h62dcd97_1 conda-forge yaml 0.2.5 h8ffe710_2 conda-forge yapf 0.32.0 pyhd8ed1ab_0 conda-forge zeromq 4.3.4 h0e60522_1 conda-forge zipp 3.7.0 pyhd8ed1ab_1 conda-forge zlib 1.2.11 h8ffe710_1014 conda-forge zstd 1.5.2 h6255e5f_0 conda-forge

prascle commented 2 years ago

Your list is more up to date than mine, but the differences I see seems minor (mainly maintainance versions), so that should not be a problem. However, I will try to find the time to check...

To be sure, maybe could you check the paths and verify that the library _cloudComPy.pyd is present and in the paths. The library is in <install path>/CloudComPy39/CloudCompare

To list the paths, when the environment is set, after envCloudComPy.bat

echo %PATH%
echo %PYTHONPATH%

Paul

antoinebio commented 2 years ago

command echo %PATH§ returns C:\ProgramData\Anaconda3\envs\cloudComPy39;C:\ProgramData\Anaconda3\envs\cloudComPy39\Library\mingw-w64\bin;C:\ProgramData\Anaconda3\envs\cloudComPy39\Library\usr\bin;C:\ProgramData\Anaconda3\envs\cloudComPy39\Library\bin;C:\ProgramData\Anaconda3\envs\cloudComPy39\Scripts;C:\ProgramData\Anaconda3\envs\cloudComPy39\bin;C:\ProgramData\Anaconda3\condabin;C:\Python37\Scripts;C:\Python37;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files\PowerShell\6;C:\Program Files\PuTTY;C:\Program Files\FME;C:\Program Files\Displaz\bin;C:\Users\billault.ATGT.001\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\ProgramData\Anaconda3\python.exe;C:\Python37\python.exe;.;C:\adb;C:\Program Files\Point Grey Research\Ladybug\bin64;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\ProgramData\chocolatey\bin;C:\Users\billault.ATGT.001\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\ProgramData\Anaconda3\python.exe;C:\Python37\python.exe;.

command echo %PYTHONPATH% returns C:\ProgramData\Anaconda3\envs\cloudComPy39;C:\ProgramData\Anaconda3\envs\cloudComPy39\Library\mingw-w64\bin;C:\ProgramData\Anaconda3\envs\cloudComPy39\Library\usr\bin;C:\ProgramData\Anaconda3\envs\cloudComPy39\Library\bin;C:\ProgramData\Anaconda3\envs\cloudComPy39\Scripts;C:\ProgramData\Anaconda3\envs\cloudComPy39\bin;C:\ProgramData\Anaconda3\condabin;C:\Python37\Scripts;C:\Python37;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files\PowerShell\6;C:\Program Files\PuTTY;C:\Program Files\FME;C:\Program Files\Displaz\bin;C:\Users\billault.ATGT.001\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\ProgramData\Anaconda3\python.exe;C:\Python37\python.exe;.;C:\adb;C:\Program Files\Point Grey Research\Ladybug\bin64;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\ProgramData\chocolatey\bin;C:\Users\billault.ATGT.001\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\ProgramData\Anaconda3\python.exe;C:\Python37\python.exe;.

prascle commented 2 years ago

Hello, I have reproduced your problem. Your conda environment is not compatible with the cloudComPy binary: there are recent updates on the conda packages, not taken into account when I built the binary. I will propose a fix as soon as possible, sorry for the inconvenience and thanks for finding this bug! Paul

prascle commented 2 years ago

Here is a solution that works for me: I force versions into my conda package list:

conda update -y -n base -c defaults conda
conda activate
conda create -y --name CloudComPy39 python=3.9
   # --- erase previous env if existing
conda activate CloudComPy39
conda config --add channels conda-forge
conda config --set channel_priority strict
conda install -y "boost=1.72" "cgal=5.0" cmake "ffmpeg=4.3" "gdal=3.3" "jupyterlab=3.2" "matplotlib=3.5" "mysql=8.0" "numpy=1.22" "opencv=4.5" "openmp=8.0" "pcl=1.11" "pdal=2.3" "psutil=5.9" "qt=5.12" "scipy=1.8" "sphinx_rtd_theme=1.0" "spyder=5.2" "tbb=2021.5" "tbb-devel=2021.5" "xerces-c=3.2"

Could you please check and let me know if this works for you? Best regards, Paul

antoinebio commented 2 years ago

@prascle I have removed my env CloudComPy39 then installed again following your tips

but still that weird issue

image

below conda list command answer

packages in environment at C:\ProgramData\Anaconda3\envs\CloudComPy39:

#

Name Version Build Channel

alabaster 0.7.12 py_0 conda-forge anyio 3.5.0 py39hcbf5309_0 conda-forge argh 0.26.2 pyh9f0ad1d_1002 conda-forge argon2-cffi 21.3.0 pyhd8ed1ab_0 conda-forge argon2-cffi-bindings 21.2.0 py39hb82d6ee_1 conda-forge arrow 1.2.2 pyhd8ed1ab_0 conda-forge astroid 2.11.2 py39hcbf5309_0 conda-forge atomicwrites 1.4.0 pyh9f0ad1d_0 conda-forge attrs 21.4.0 pyhd8ed1ab_0 conda-forge autopep8 1.6.0 pyhd8ed1ab_1 conda-forge babel 2.9.1 pyh44b312d_0 conda-forge backcall 0.2.0 pyh9f0ad1d_0 conda-forge backports 1.0 py_2 conda-forge backports.functools_lru_cache 1.6.4 pyhd8ed1ab_0 conda-forge bcrypt 3.2.0 py39hb82d6ee_2 conda-forge beautifulsoup4 4.10.0 pyha770c72_0 conda-forge binaryornot 0.4.4 py_1 conda-forge black 22.3.0 pyhd8ed1ab_0 conda-forge bleach 4.1.0 pyhd8ed1ab_0 conda-forge boost 1.72.0 py39h44f2603_1 conda-forge boost-cpp 1.72.0 h5b4e17d_6 conda-forge brotli 1.0.9 h8ffe710_6 conda-forge brotli-bin 1.0.9 h8ffe710_6 conda-forge brotlipy 0.7.0 py39hb82d6ee_1003 conda-forge bzip2 1.0.8 h8ffe710_4 conda-forge ca-certificates 2021.10.8 h5b45459_0 conda-forge cairo 1.16.0 hb19e0ff_1008 conda-forge certifi 2021.10.8 py39hcbf5309_2 conda-forge cffi 1.15.0 py39h0878f49_0 conda-forge cfitsio 3.470 h0af3d06_7 conda-forge cgal 5.0.1 py39hbe72964_3 conda-forge cgal-cpp 5.0.1 h26c6e29_1 conda-forge chardet 4.0.0 py39hcbf5309_2 conda-forge charset-normalizer 2.0.12 pyhd8ed1ab_0 conda-forge click 8.1.1 py39hcbf5309_1 conda-forge cloudpickle 2.0.0 pyhd8ed1ab_0 conda-forge cmake 3.23.0 h39d44d4_1 conda-forge colorama 0.4.4 pyh9f0ad1d_0 conda-forge cookiecutter 1.7.3 pyh6c4a22f_1 conda-forge cryptography 36.0.2 py39h7bc7c5c_0 conda-forge curl 7.82.0 h789b8ee_0 conda-forge cycler 0.11.0 pyhd8ed1ab_0 conda-forge dataclasses 0.8 pyhc8e2a94_3 conda-forge debugpy 1.5.1 py39h415ef7b_0 conda-forge decorator 5.1.1 pyhd8ed1ab_0 conda-forge defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge diff-match-patch 20200713 pyh9f0ad1d_0 conda-forge dill 0.3.4 pyhd8ed1ab_0 conda-forge docutils 0.17.1 py39hcbf5309_1 conda-forge draco 1.5.2 h5362a0b_0 conda-forge eigen 3.4.0 h2d74725_0 conda-forge entrypoints 0.4 pyhd8ed1ab_0 conda-forge expat 2.4.8 h39d44d4_0 conda-forge ffmpeg 4.3.1 ha925a31_0 conda-forge flake8 4.0.1 pyhd8ed1ab_2 conda-forge flann 1.9.1 h7dfa0ef_1008 conda-forge flit-core 3.7.1 pyhd8ed1ab_0 conda-forge fontconfig 2.13.96 hce3cb01_2 conda-forge fonttools 4.31.2 py39hb82d6ee_0 conda-forge freeglut 3.2.2 h0e60522_1 conda-forge freetype 2.10.4 h546665d_1 conda-forge freexl 1.0.6 ha8e266a_0 conda-forge gdal 3.3.1 py39h6795fcd_2 conda-forge geos 3.9.1 h39d44d4_2 conda-forge geotiff 1.6.0 ha8a8a2d_6 conda-forge gettext 0.19.8.1 ha2e2712_1008 conda-forge hdf4 4.2.15 h0e5069d_3 conda-forge hdf5 1.10.6 nompi_h5268f04_1114 conda-forge icu 68.2 h0e60522_0 conda-forge idna 3.3 pyhd8ed1ab_0 conda-forge imagesize 1.3.0 pyhd8ed1ab_0 conda-forge importlib-metadata 4.11.3 py39hcbf5309_1 conda-forge importlib_metadata 4.11.3 hd8ed1ab_1 conda-forge importlib_resources 5.6.0 pyhd8ed1ab_0 conda-forge inflection 0.5.1 pyh9f0ad1d_0 conda-forge intel-openmp 2022.0.0 h57928b3_3663 conda-forge intervaltree 3.0.2 py_0 conda-forge ipykernel 6.11.0 py39h832f523_0 conda-forge ipython 7.32.0 py39hcbf5309_0 conda-forge ipython_genutils 0.2.0 py_1 conda-forge isort 5.10.1 pyhd8ed1ab_0 conda-forge jasper 2.0.33 h77af90b_0 conda-forge jbig 2.1 h8d14728_2003 conda-forge jedi 0.18.1 py39hcbf5309_0 conda-forge jellyfish 0.9.0 py39hb82d6ee_0 conda-forge jinja2 3.1.1 pyhd8ed1ab_0 conda-forge jinja2-time 0.2.0 pyhd8ed1ab_3 conda-forge jpeg 9e h8ffe710_0 conda-forge json5 0.9.5 pyh9f0ad1d_0 conda-forge jsoncpp 1.9.4 h2d74725_3 conda-forge jsonschema 4.4.0 pyhd8ed1ab_0 conda-forge jupyter_client 7.2.1 pyhd8ed1ab_0 conda-forge jupyter_core 4.9.2 py39hcbf5309_0 conda-forge jupyter_server 1.16.0 pyhd8ed1ab_1 conda-forge jupyterlab 3.2.9 pyhd8ed1ab_0 conda-forge jupyterlab_pygments 0.1.2 pyh9f0ad1d_0 conda-forge jupyterlab_server 2.12.0 pyhd8ed1ab_0 conda-forge kealib 1.4.14 h96bfa42_2 conda-forge keyring 23.4.0 py39hcbf5309_2 conda-forge kiwisolver 1.4.2 py39h2e07f2f_0 conda-forge krb5 1.19.3 h1176d77_0 conda-forge laszip 3.4.3 h6538335_1 conda-forge laz-perf 3.0.0 h2d74725_0 conda-forge lazy-object-proxy 1.7.1 py39hb82d6ee_0 conda-forge lcms2 2.12 h2a16943_0 conda-forge lerc 3.0 h0e60522_0 conda-forge libblas 3.9.0 13_win64_mkl conda-forge libbrotlicommon 1.0.9 h8ffe710_6 conda-forge libbrotlidec 1.0.9 h8ffe710_6 conda-forge libbrotlienc 1.0.9 h8ffe710_6 conda-forge libcblas 3.9.0 13_win64_mkl conda-forge libclang 11.1.0 default_h5c34c98_1 conda-forge libcurl 7.82.0 h789b8ee_0 conda-forge libdeflate 1.10 h8ffe710_0 conda-forge libevent 2.1.10 h6a571f8_4 conda-forge libffi 3.4.2 h8ffe710_5 conda-forge libgdal 3.3.1 h7e75cf7_2 conda-forge libglib 2.70.2 h3be07f2_4 conda-forge libiconv 1.16 he774522_0 conda-forge libkml 1.3.0 h9d95caa_1012 conda-forge liblapack 3.9.0 13_win64_mkl conda-forge liblapacke 3.9.0 13_win64_mkl conda-forge libnetcdf 4.8.1 nompi_hf689e7d_100 conda-forge libopencv 4.5.3 py39h4b6fd43_6 conda-forge libpng 1.6.37 h1d00b33_2 conda-forge libpq 13.5 hfcc5ef8_1 conda-forge libprotobuf 3.18.1 h7755175_0 conda-forge librttopo 1.1.0 hb340de5_6 conda-forge libsodium 1.0.18 h8d14728_1 conda-forge libspatialindex 1.9.3 h39d44d4_4 conda-forge libspatialite 5.0.1 h762a7f4_6 conda-forge libssh2 1.10.0 h680486a_2 conda-forge libtiff 4.3.0 hc4061b1_3 conda-forge libwebp 1.2.2 h57928b3_0 conda-forge libwebp-base 1.2.2 h8ffe710_1 conda-forge libxcb 1.13 hcd874cb_1004 conda-forge libxml2 2.9.12 hf5bbc77_2 conda-forge libzip 1.8.0 hfed4ece_1 conda-forge libzlib 1.2.11 h8ffe710_1014 conda-forge llvm-openmp 8.0.1 h1ad3211_0 conda-forge lz4-c 1.9.3 h8ffe710_1 conda-forge m2w64-gcc-libgfortran 5.3.0 6 conda-forge m2w64-gcc-libs 5.3.0 7 conda-forge m2w64-gcc-libs-core 5.3.0 7 conda-forge m2w64-gmp 6.1.0 2 conda-forge m2w64-libwinpthread-git 5.0.0.4634.697f757 2 conda-forge markupsafe 2.1.1 py39hb82d6ee_1 conda-forge matplotlib 3.5.1 py39hcbf5309_0 conda-forge matplotlib-base 3.5.1 py39h581301d_0 conda-forge matplotlib-inline 0.1.3 pyhd8ed1ab_0 conda-forge mccabe 0.6.1 py_1 conda-forge mistune 0.8.4 py39hb82d6ee_1005 conda-forge mkl 2022.0.0 h0e2418a_796 conda-forge mpfr 4.1.0 h8d14728_1 conda-forge mpir 3.0.0 he025d50_1002 conda-forge msys2-conda-epoch 20160418 1 conda-forge munkres 1.1.4 pyh9f0ad1d_0 conda-forge mypy_extensions 0.4.3 py39hcbf5309_4 conda-forge mysql 8.0.27 h57928b3_0 conda-forge mysql-client 8.0.27 hf8b63c5_0 conda-forge mysql-common 8.0.27 h57928b3_0 conda-forge mysql-devel 8.0.27 h57928b3_0 conda-forge mysql-libs 8.0.27 h4d1747d_0 conda-forge mysql-server 8.0.27 h2b15538_0 conda-forge nbclassic 0.3.7 pyhd8ed1ab_0 conda-forge nbclient 0.5.13 pyhd8ed1ab_0 conda-forge nbconvert 6.4.5 pyhd8ed1ab_1 conda-forge nbconvert-core 6.4.5 pyhd8ed1ab_1 conda-forge nbconvert-pandoc 6.4.5 pyhd8ed1ab_1 conda-forge nbformat 5.2.0 pyhd8ed1ab_0 conda-forge nest-asyncio 1.5.4 pyhd8ed1ab_0 conda-forge nitro 2.7.dev6 h39d44d4_5 conda-forge notebook 6.4.10 pyha770c72_0 conda-forge notebook-shim 0.1.0 pyhd8ed1ab_0 conda-forge numpy 1.22.3 py39h6331f09_0 conda-forge numpydoc 1.2.1 pyhd8ed1ab_0 conda-forge opencv 4.5.3 py39hcbf5309_6 conda-forge openjpeg 2.4.0 hb211442_1 conda-forge openmp 8.0.1 0 conda-forge openssl 1.1.1n h8ffe710_0 conda-forge packaging 21.3 pyhd8ed1ab_0 conda-forge pandoc 2.17.1.1 h57928b3_0 conda-forge pandocfilters 1.5.0 pyhd8ed1ab_0 conda-forge paramiko 2.10.3 pyhd8ed1ab_0 conda-forge parso 0.8.3 pyhd8ed1ab_0 conda-forge pathspec 0.9.0 pyhd8ed1ab_0 conda-forge pcl 1.11.1 hc775808_1 conda-forge pcre 8.45 h0e60522_0 conda-forge pdal 2.3.0 hde8ebe7_6 conda-forge pexpect 4.8.0 pyh9f0ad1d_2 conda-forge pickleshare 0.7.5 py_1003 conda-forge pillow 9.0.1 py39ha53f419_2 conda-forge pip 22.0.4 pyhd8ed1ab_0 conda-forge pixman 0.40.0 h8ffe710_0 conda-forge pkg-config 0.29.2 h2bf4dc2_1008 conda-forge pkgconfig 1.5.5 py39hcbf5309_1 conda-forge platformdirs 2.5.1 pyhd8ed1ab_0 conda-forge pluggy 1.0.0 py39hcbf5309_2 conda-forge poppler 21.03.0 h9ff6ed8_0 conda-forge poppler-data 0.4.11 hd8ed1ab_0 conda-forge postgresql 13.5 h1c22c4f_1 conda-forge poyo 0.5.0 py_0 conda-forge proj 8.0.1 h1cfcee9_0 conda-forge prometheus_client 0.13.1 pyhd8ed1ab_0 conda-forge prompt-toolkit 3.0.27 pyha770c72_0 conda-forge psutil 5.9.0 py39hb82d6ee_0 conda-forge pthread-stubs 0.4 hcd874cb_1001 conda-forge ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge py-opencv 4.5.3 py39h832f523_6 conda-forge pycodestyle 2.8.0 pyhd8ed1ab_0 conda-forge pycparser 2.21 pyhd8ed1ab_0 conda-forge pydocstyle 6.1.1 pyhd8ed1ab_0 conda-forge pyflakes 2.4.0 pyhd8ed1ab_0 conda-forge pygments 2.11.2 pyhd8ed1ab_0 conda-forge pylint 2.13.4 pyhd8ed1ab_0 conda-forge pyls-spyder 0.4.0 pyhd8ed1ab_0 conda-forge pynacl 1.5.0 py39hb3671d1_0 conda-forge pyopenssl 22.0.0 pyhd8ed1ab_0 conda-forge pyparsing 3.0.7 pyhd8ed1ab_0 conda-forge pyqt 5.12.3 py39hcbf5309_8 conda-forge pyqt-impl 5.12.3 py39h415ef7b_8 conda-forge pyqt5-sip 4.19.18 py39h415ef7b_8 conda-forge pyqtchart 5.12 py39h415ef7b_8 conda-forge pyqtwebengine 5.12.1 py39h415ef7b_8 conda-forge pyrsistent 0.18.1 py39hb82d6ee_0 conda-forge pysocks 1.7.1 py39hcbf5309_4 conda-forge python 3.9.12 h9a09f29_1_cpython conda-forge python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge python-lsp-black 1.1.0 pyhd8ed1ab_0 conda-forge python-lsp-jsonrpc 1.0.0 pyhd8ed1ab_0 conda-forge python-lsp-server 1.3.3 pyhd8ed1ab_0 conda-forge python-slugify 6.1.1 pyhd8ed1ab_0 conda-forge python_abi 3.9 2_cp39 conda-forge pytz 2022.1 pyhd8ed1ab_0 conda-forge pywin32 303 py39hb82d6ee_0 conda-forge pywin32-ctypes 0.2.0 py39hcbf5309_1005 conda-forge pywinpty 2.0.5 py39h99910a6_0 conda-forge pyyaml 6.0 py39hb82d6ee_3 conda-forge pyzmq 22.3.0 py39he46f08e_1 conda-forge qdarkstyle 3.0.2 pyhd8ed1ab_0 conda-forge qhull 2020.2 h70d2c02_2 conda-forge qstylizer 0.2.1 pyhd8ed1ab_0 conda-forge qt 5.12.9 h5909a2a_4 conda-forge qtawesome 1.1.1 pyhd8ed1ab_0 conda-forge qtconsole 5.2.2 pyhd8ed1ab_1 conda-forge qtconsole-base 5.2.2 pyhd8ed1ab_1 conda-forge qtpy 2.0.1 pyhd8ed1ab_0 conda-forge requests 2.27.1 pyhd8ed1ab_0 conda-forge rope 0.23.0 pyhd8ed1ab_0 conda-forge rtree 0.9.7 py39h09fdee3_3 conda-forge scipy 1.8.0 py39hc0c34ad_1 conda-forge send2trash 1.8.0 pyhd8ed1ab_0 conda-forge setuptools 61.2.0 py39hcbf5309_3 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge sniffio 1.2.0 py39hcbf5309_2 conda-forge snowballstemmer 2.2.0 pyhd8ed1ab_0 conda-forge sortedcontainers 2.4.0 pyhd8ed1ab_0 conda-forge soupsieve 2.3.1 pyhd8ed1ab_0 conda-forge sphinx 4.5.0 pyh6c4a22f_0 conda-forge sphinx_rtd_theme 1.0.0 pyhd8ed1ab_0 conda-forge sphinxcontrib-applehelp 1.0.2 py_0 conda-forge sphinxcontrib-devhelp 1.0.2 py_0 conda-forge sphinxcontrib-htmlhelp 2.0.0 pyhd8ed1ab_0 conda-forge sphinxcontrib-jsmath 1.0.1 py_0 conda-forge sphinxcontrib-qthelp 1.0.3 py_0 conda-forge sphinxcontrib-serializinghtml 1.1.5 pyhd8ed1ab_1 conda-forge spyder 5.2.2 py39hcbf5309_3 conda-forge spyder-kernels 2.2.1 py39hcbf5309_1 conda-forge sqlite 3.37.1 h8ffe710_0 conda-forge tbb 2021.5.0 h2d74725_0 conda-forge tbb-devel 2021.5.0 h2d74725_0 conda-forge terminado 0.13.3 py39hcbf5309_0 conda-forge testpath 0.6.0 pyhd8ed1ab_0 conda-forge text-unidecode 1.3 py_0 conda-forge textdistance 4.2.2 pyhd8ed1ab_0 conda-forge three-merge 0.1.1 pyh9f0ad1d_0 conda-forge tiledb 2.3.4 h78dabda_0 conda-forge tinycss2 1.1.1 pyhd8ed1ab_0 conda-forge tk 8.6.12 h8ffe710_0 conda-forge toml 0.10.2 pyhd8ed1ab_0 conda-forge tomli 2.0.1 pyhd8ed1ab_0 conda-forge tornado 6.1 py39hb82d6ee_2 conda-forge traitlets 5.1.1 pyhd8ed1ab_0 conda-forge typed-ast 1.5.2 py39hb82d6ee_0 conda-forge typing-extensions 4.1.1 hd8ed1ab_0 conda-forge typing_extensions 4.1.1 pyha770c72_0 conda-forge tzdata 2022a h191b570_0 conda-forge ucrt 10.0.20348.0 h57928b3_0 conda-forge ujson 5.1.0 py39h415ef7b_1 conda-forge unicodedata2 14.0.0 py39hb82d6ee_0 conda-forge unidecode 1.3.4 pyhd8ed1ab_0 conda-forge urllib3 1.26.9 pyhd8ed1ab_0 conda-forge vc 14.2 hb210afc_6 conda-forge vs2015_runtime 14.29.30037 h902a5da_6 conda-forge watchdog 2.1.7 py39hcbf5309_0 conda-forge wcwidth 0.2.5 pyh9f0ad1d_2 conda-forge webencodings 0.5.1 py_1 conda-forge websocket-client 1.3.2 pyhd8ed1ab_0 conda-forge wheel 0.37.1 pyhd8ed1ab_0 conda-forge win_inet_pton 1.1.0 py39hcbf5309_3 conda-forge winpty 0.4.3 4 conda-forge wrapt 1.14.0 py39hb82d6ee_0 conda-forge xerces-c 3.2.3 h0e60522_4 conda-forge xorg-libxau 1.0.9 hcd874cb_0 conda-forge xorg-libxdmcp 1.1.3 hcd874cb_0 conda-forge xz 5.2.5 h62dcd97_1 conda-forge yaml 0.2.5 h8ffe710_2 conda-forge yapf 0.32.0 pyhd8ed1ab_0 conda-forge zeromq 4.3.4 h0e60522_1 conda-forge zipp 3.7.0 pyhd8ed1ab_1 conda-forge zlib 1.2.11 h8ffe710_1014 conda-forge zstd 1.5.2 h6255e5f_0 conda-forge

prascle commented 2 years ago

Looking at your snapshot of Anaconda prompt, it looks like you have not set the CloudComPy paths, by calling envCloudComPy.bat

conda activate CloudComPy39
C:\Users\paulr>CloudComPy\install\CloudComPy39\envCloudComPy.bat
python yourScript.py

Is it the case ?

Remark: after activating conda, you shoud have the good Python without needing to set its path. check with where python The first of the list should be the good one. If not, your environment is not correct.

Paul

antoinebio commented 2 years ago

you were right Paul ;) image many thanks for the kind support

antoinebio commented 2 years ago

hello @prascle

in order to compare 1 Neighbors ptscloud, I have tested the cc.DistanceComputationTools.computeCloud2CloudDistances image

the command returns 1 which I guess is not correct. I expected all stats instead... is there any missing parameter in the param argument ?

prascle commented 2 years ago

Hello, The functions that return stats are computeApproxCloud2CloudDistanceand computeApproxCloud2MeshDistance. the functions computeCloud2CloudDistancesand computeCloud2MeshDistances return an integer. See the doc. I think there is probably an error in the doc: for computeCloud2CloudDistancesand computeCloud2MeshDistances return a negative integer in case of error, but anything else should be OK. So, your return value seems OK. See for instance test009.py.

Paul

antoinebio commented 2 years ago

ok right thank you I misundertood the user guide....

in your test009.py what is the signification of line #120 ? cc.DistanceComputationTools.computeCloud2CloudDistances(dish.getAssociatedCloud(), box.getAssociatedCloud(), params2)

is it to get the resulting pointcloud ? in CC GUI I remember the new scalar field is stored in the referenced pointcloud

so if I want to save the resulting pointcloud it would be something like this ?

C2Cres=cc.DistanceComputationTools.computeCloud2CloudDistances(cloud1,cloud2,param) res=cc.SaveEntities(C2Cres, "C:/Users/xxx/perline/myC2C_Cloud.bin")
if res != cc.CC_FILE_ERROR.CC_FERR_NO_ERROR: raise RuntimeError

prascle commented 2 years ago

The line #120 means: Compute distance from each node of the dish associated cloud to the box associated cloud and create a scalar field on the dish associated cloud with the distance values. So, you need to save the cloud on which you have created the new scalar field with distances. In your example, cloud1. If you save only one cloud with cc.SaveEntities, you still need to create a list with [].

C2Cres=cc.DistanceComputationTools.computeCloud2CloudDistances(cloud1,cloud2,param)
res = cc.SaveEntities([cloud1],  "C:/Users/xxx/perline/myC2C_Cloud.bin")

C2Cres and res are return status. If you check the result of test009.py in CloudCompare, you get this (see the nodes colored by the C2C absolute distance on the selected dish) image

antoinebio commented 2 years ago

ok thanks i will try please note that command cc.DistanceComputationTools.computeApproxCloud2CloudDistance(cloud1,cloud2,param) returns errors image

prascle commented 2 years ago

Yes, it is normal, the command computeApproxCloud2CloudDistancedoes not take the same arguments as computeCloud2CloudDistances, see the doc ! The computeApproxCloud2CloudDistance is faster than computeCloud2CloudDistances but less accurate. You can use the approx command to help you to find the correct parameters for the accurate calculation.

antoinebio commented 2 years ago

Hello I tested several ways using cc.DistanceComputationTools.computeCloud2CloudDistances(cloud1,cloud2,param)

do you think it would be possible with cc to store ['C2C absolute distances'] SCALAR FIELD in LAS/LAZ format (especially 1.4 version) ?

some proprietary software provider use extra bytes to add metadata for each pts of the pointcloud. Eg. with AGISOFT METASHAPE > Confidence is exported to LAS/LAZ formats via the extra bytes concept introduced in the LAS 1.4 specification. (Confidence is a stat indication of the quality of the SFM algo when reconstructring the pointcloud).

prascle commented 2 years ago

Hello, The version used for las/laz files is, I think, 1.2 and CloudCompare uses PDAL writers for that. With this version, it is possible to save scalar fields and to read them again, with CloudCompare and CloudComPy: use cc.SavePointCloud and cc.loadPointCloud. If you want version 1.4, I don't know if it's possible, you should have a look at the CloudCompare forum, for example.

antoinebio commented 2 years ago

hello paul as far as I know cloudcompare GUI can save in LAZ1.4 format. should I force it when using cc.savePointCloud ? with a forced argument ? i cannot figure out how... https://www.simulation.openfields.fr/documentation/CloudComPy/html/cloudComPy.html?highlight=save#cloudComPy.SavePointCloud

prascle commented 2 years ago

Hello Antoine, In the version of CloudCompPy and CloudCompare that I generate, I did not integrate all the plugin options related to the Las/Laz files that are in the official CloudCompare binaries, so there are no options to choose the las/laz version. I'll add that to my TODO list! Paul

antoinebio commented 2 years ago

that would be great ! thank you Paul

prascle commented 2 years ago

Hello, The latest version of CloudComPy handles the laz1.4 format, see here. Paul