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

cloudComPy Installation completion #186

Open
mansinnikam opened this issue Jul 26, 2024 · 21 comments
Open

cloudComPy Installation completion #186

mansinnikam opened this issue Jul 26, 2024 · 21 comments

Comments

@mansinnikam
Copy link

Hello, I have been trying to install cloudCompy module for some time now and each time i find out something new that is left to. At this rate I am done with these tasks:

  1. Installation Steps from this page for windows: https://github.com/CloudCompare/CloudComPy/blob/master/doc/UseWindowsCondaBinary.md . I was unable to execute test 41.
  2. I have installed Visual Studio CloudCompare, python version 3.10 and i have been trying to install pluggins through cmake but everytime it doesnt execute because json file is not compatible with python version. So im stuck there.
  3. I am able to import cloudComPy but i get errors while running test python script from README as it shows attributes like 'loadfile' and others are missing. Can you help me with what i could do to finally use this wrapper as i have to work on my thesis on this and finish my project in two months
@prascle
Copy link
Collaborator

prascle commented Jul 26, 2024

Hello,

  1. Is test41 the only test that doesn't work? If so, can you give the error message for this test by running it separately?
  2. Are you trying to rebuild CloudComPy from source? You don't need to unless you want to change something in the code. All plugins are included in the Windows binary package.
  3. I'm not sure what script you're trying to run. I don't know a loadfile method... If most of the tests work, you can have a look at the use cases: all the examples are taken from Python tests. If some tests fail, like test41, please give me a detailed error message so I can try to find out what's wrong.
    Paul

@prascle
Copy link
Collaborator

prascle commented Jul 27, 2024

Regarding point 2 above, you may have tried using the CloudCompare binary from https://cloudcompare.org which comes with a Python plugin inside. The documentation for this plugin is here. Unfortunately, this Python interface is not the same as CloudComPy: you can't mix the two.
I can only help you with CloudComPy.
Paul

@mansinnikam
Copy link
Author

So, I ran the tests again. test 41 shows the error in image 1 and test 50 gets skipped.
test 41 error
The main error I am facing while running this test script example : https://github.com/CloudCompare/CloudComPy/blob/master/README.md .
READ me script
The import seems incomplete and I dont know what to do.

@prascle
Copy link
Collaborator

prascle commented Jul 29, 2024

It's strange: importFile is used in tests 20, 21, 40, 41, 51. I don't understand why it fails in test 41 and not in the others.
Test 50 is ignored because it requires a huge file, and the test is only used by me to check the version before publication.
Odd too: initCC should work, since it's called internally. Incidentally, it's no longer necessary to call it explicitly, as this is done when cloudComPy is first imported, and subsequent calls do nothing.
If you want to run the script in the README, you also need to provide a cloud file (myCloud.xyz) in the runtime directory.

I don't yet have an explanation for this behavior.
What is the result of the where python command in your terminal in the conda CloudComPy310 environment?
If you get several lines, the first one should be the conda python.

Paul

@mansinnikam
Copy link
Author

For where python I got this.
1

@prascle
Copy link
Collaborator

prascle commented Jul 29, 2024

Your python seems to be the right one.
What exactly is the binary file you downloaded and installed for cloudComPy, since there are several versions in the download area?

@mansinnikam
Copy link
Author

The first one: CloudComPy310_20240613

@prascle
Copy link
Collaborator

prascle commented Jul 29, 2024

Ok, can you execute the following command in your terminal with the conda CloudComPy310 environment?
conda list > list.txt
Can you post the file list.txt here ?

@mansinnikam
Copy link
Author

list.txt

@prascle
Copy link
Collaborator

prascle commented Jul 29, 2024

I don't see any noticeable difference between your list and mine, yours is a bit more up to date than mine, I'll check that in more detail.

I'd like to check your environment in Python. Can you run the following Python script in your terminal with the conda CloudComPy310 environment and post the envpickle file?

import os
import pickle
env=dict(os.environ)
dbfile = open('envpickle', 'wb')
pickle.dump(env, dbfile)
dbfile.close()

@mansinnikam
Copy link
Author

Here it is
envpickle.txt
i cannot upload the file directly here as format is not supported but here is the text version

@prascle
Copy link
Collaborator

prascle commented Jul 29, 2024

How did you produce the text version? (I'd like to invert to get the binary version)

@prascle
Copy link
Collaborator

prascle commented Jul 29, 2024

It may be easier to use json to serialize in text format:

import os
import json
env=dict(os.environ)
dbfile = open('envjson', 'w')
json.dump(env, dbfile)
dbfile.close()

Can you send the envjson file?

@mansinnikam
Copy link
Author

Is this okay?
envjson.txt

@prascle
Copy link
Collaborator

prascle commented Jul 29, 2024

Perfect, I can compare the environments!

@prascle
Copy link
Collaborator

prascle commented Jul 29, 2024

At first glance, everything seems fine, but I'm going to take a closer look, as I don't yet have any ideas for further investigation...
Paul

@mansinnikam
Copy link
Author

Okay sure. I would really appreciate help with this issue as my project is slightly delayed. Hope to hear soon. Thank you!

@mansinnikam
Copy link
Author

Hello, Is there any issue found? or alternative solution

@prascle
Copy link
Collaborator

prascle commented Aug 8, 2024

Hello, I'm sorry, but I haven't found any differences in your environment that could explain this behavior. Your Pythonpath is set with the CloudComPy310 path: this is not necessary but harmless (the Pythonpath is set when you call envCloudComPy.bat). The CloudComPy310 path should not contain spaces, but but it doesn't in your case..

Can you confirm that the behavior is reproducible? Can you run for example in your conda terminal (one line at a time, to see the results) (change the path below to your CloudComPy binary installation if it's not C:\Users\ABC\CloudComPy310) :

conda activate CloudComPy310
cd C:\Users\ABC\CloudComPy310
envCloudComPy.bat
cd doc\PythonAPI_test
python test020.py,
python test021.py,
python test040.py
python test041.py
python test020.py,
python test021.py,
python test040.py
python test041.py
...

If I understand your problem correctly, only test 41 fails systematically, the other tests produce results in the CloudComPy\data directory on your home.
If you confirm this behavior, I have no idea what's going on...

Paul

@mansinnikam
Copy link
Author

Hello, So i uninstalled everything and reinstalled again so i was able to do everything for Windows installation till checking envCloudCompy.bat it was succesful but now i am unable to implement ctest as these errors come.
12
13
14
15

i could actually see this dll files in directory C:\Users\ABC\mnikam

@prascle
Copy link
Collaborator

prascle commented Aug 18, 2024

Hello,
That's strange, the dll files are debug versions of the dll used by CloudComPy. If you have reinstalled a complete Windows system from scratch, you may need to add the latest supported downloads of Microsoft Visual C++ Redistributable from https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170 (https://aka.ms/vs/17/release/vc_redist.x64.exe should do the trick).
In any case, if you have these dlls in C:\Users\ABC\mnikam, you can try adding this directory to your path, but it doesn't seem to be a standard directory for these dlls.
Paul

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

2 participants