CloudCompare / CloudComPy

Python wrapper for CloudCompare
Other
282 stars 40 forks source link

AttributeError: module 'CloudComPy' has no attribute 'loadPointCloud' #190

Open Bra369 opened 1 month ago

Bra369 commented 1 month ago

Hello everyone,

I'm new to using CloudCompy and still working on improving my programming skills, which are currently at a moderate level. I've recently set up CloudCompy following the instructions provided, but I'm encountering an issue where several modules and functions are not being imported or recognized such as loadpointcloud.

Has anyone else experienced a similar problem or could provide guidance on what might be causing this? Any help would be greatly appreciated!

Thanks in advance!

prascle commented 4 weeks ago

Hello, Which system do you work with (Windows 10/11, Linux, macOS)? There are specific installation instructions for each system, with several steps. A problem with a step can lead to import problems. You may have received warning or error messages. Can you give details?

Best regards, Paul

Bra369 commented 3 weeks ago

Hi, thank you for your response. in a strange way for me, i found that moving out some file from their sub dictionary made python identify these modules.

prascle commented 3 weeks ago

Hi, if moving some files helps, the Pythonpath and / or Path are not set properly: something must be wrong with one of the steps: on Windows, it's likely envCloudComPy.bat that doesn't work properly. If you post some details on the messages you get when setting the environment, I can help you to get a proper installation. Paul

Le mar. 20 août 2024, 12:52, Bra369 @.***> a écrit :

Hi, thank you for your response. in a strange way for me, i found that moving out some file from their sub dictionary made python identify these modules.

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

Bra369 commented 3 weeks ago

thank you Paul for your prompt response, and excuse me for my late response. if its helps, i'll attach some picture of the PATHS and PYTHPATH in addition to my build dictionary (sequanced form build dir 1 to 5),
https://ibb.co/TYZ2qnp https://ibb.co/RpQkZDB https://ibb.co/L9sdYvZ https://ibb.co/wcwf04n https://ibb.co/F445mpD https://ibb.co/N9yz8z7 https://ibb.co/kK9LckJ

prascle commented 3 weeks ago

Oh, I don't quite understand what you want to do. I thought you wanted to make developments in Python using CloudComPy already built. I don't understand this directory: CloudCompare/build Build of what? CloudCompare, CloudComPy? I'm not familiar with the build dictionary concept... In this directory, there's a whole bunch of flat stuff, without the usual structure of a build or install directory, with a mixture of binaries and sources... Can you describe what you want to do? If your goal is to rebuild CloudComPy from source, take a look at the build instructions for Windows and let me know what's not clear. These instructions may not be completely up to date. Paul

Bra369 commented 3 weeks ago

Hi Paul, well. i'm trying to create an enhanced SVM/classification plugin like CANUPO, i don't want to rebuild CloudComPy from the source

prascle commented 3 weeks ago

OK, that makes sense now! I've never tried to do this, it's not easy to do correctly and I don't offer a generic template for building a CloudComPy plugin. You should probably build a CloudCompare C++ plugin, with or without GUI if that part doesn't interest you, and then a CloudComPy plugin using pybind11 to wrap the C++ plugin. It's an interesting problem, I could think of a solution to build a plugin based on the existing binaries rather than regenerate everything, but in the current state it's probably more complicated than rebuilding everything! If you get into it, create a project on Github or make a fork of CloudComPy, I can take a look! Paul

Bra369 commented 3 weeks ago

Hi Paul, Thanks for the clarification! It sounds like starting with a C++ plugin is the way to go. I'll begin by building the C++ plugin and then explore wrapping it with pybind11 to create the CloudComPy plugin. Once I get started, I'll set up a GitHub repository or fork CloudComPy and share the link with you. Thanks again for your help