CloudComPy icon indicating copy to clipboard operation
CloudComPy copied to clipboard

The environment detection and testing were successful, but the import still failed

Open Waydelucien opened this issue 11 months ago • 5 comments

Hello, Paul! I have fully followed the binary files and dependency package relationships you provided in the following question (https://github.com/CloudCompare/CloudComPy/issues/197) for installation, environment activation, and ctest testing.

However, I found that when I entered import cloudComPy as cc on the terminal, the prompt still showed that the module could not be found. I am providing a screenshot of my operation below, hoping to receive your response. Thank you in advance!

This is the result of my partial testing run. I interrupted this test in advance. In another complete test, test50 was skipped, test3 failed, and test20 and 41 were skipped.

Image

Here are the results of running the bat file and import. I don't know where the problem lies, can you help me?

Image

Thank you again!

Yang

Waydelucien avatar Feb 14 '25 07:02 Waydelucien

The two pictures seem to be in the wrong order, I hope you can understand them.

Waydelucien avatar Feb 14 '25 07:02 Waydelucien

My question and https://github.com/CloudCompare/CloudComPy/issues/102 are the same, I encountered the same problem running both in the VSCode terminal and PowerShell. But the questioner of question 102 did not provide an answer.

Waydelucien avatar Feb 14 '25 07:02 Waydelucien

Hello Yang,

There is no Python cloudcompare module in the cloudComPy environment, so import cloudcompare as cc does not work. The tests seem to be working, at least some of them. Can you run again the tests to get the list of non working tests ? I will check for #102.

Best regards, Paul

prascle avatar Feb 14 '25 09:02 prascle

I'm very sorry, I found that mistake when typing!

After reading this person's sharinghttps://github.com/CloudCompare/CloudComPy/issues/102, I was able to run import cloudComPy as cc in Anaconda prompt. However, it is still not possible to use VSCode (the same applies to entering code in prompt) or Spyder, and import issues still occur. I guess it might be an issue with environment variables (I haven't seen a good explanation about VSCode yet), but since I can run it with prompt, I can stop trying. My idea is to write the Python file and then directly write Python script. py in Anaconda prompt, which should achieve the same effect.

Here is the result of my tests. Can you help me check the issues with my test?

Image

Thank you very much for your prompt reply!!!

Yang

Waydelucien avatar Feb 14 '25 10:02 Waydelucien

If code does not work in the conda prompt environment, that means that the directory containing code is not in the path. I suppose it depends on the way you install VScode. you can try to type the full path of VScode...

in my case: "C:\Users\paulr\AppData\Local\Programs\Microsoft VS Code\code"

Paul

prascle avatar Feb 14 '25 10:02 prascle