CloudCompare / CloudComPy

Python wrapper for CloudCompare
Other
283 stars 40 forks source link

Installing the CloudComPy without using conda #86

Open djdan7 opened 1 year ago

djdan7 commented 1 year ago

Hi! I'm not sure if this is the right place to ask. Does anybody know if it is possible to install this library without using conda? If yes, how to do it? I preferrably don't want to install conda, I already have enough clutter on my computer, lack of disk space, and generally prefer to have a "clean" install of the libraries I only need, etc :)

Beginner here. For now using python to script some very beginning stuff. In case of CC I would like to automate some C2C distance computation between a lot of clouds

Windows 10, Python 3.9.4

Thank y'all!

xiangtaoxu commented 1 year ago

If disk space is a concern, you can start with miniconda instead of anaconda. Miniconda is only a few tens of MBs and starts with a clean package library.

prascle commented 1 year ago

Hello ! I checked my miniconda environment which contains only the minimal base environment and the CloudComPy310 environment. After a cleanup (conda clean -a) the miniconda3 directory still weighs 8.3 GB. This is a lot. I guess it could be less without installing all the packages related to Spyder, Jupyter, Sphinx... Building a minimal package is always possible, but it's hard to define the configuration that suits the needs of most users. I chose conda because I think many Python users work with many Python libraries, and already use conda. Also, using the conda environment to build and install CloudComPy, CloudCompare and its plugins makes the job easier than starting from scratch. Paul

djdan7 commented 1 year ago

Thank you guys for comments. Can you please help me get it to work? I will be very gratefull :)

What I've already done:

I've dowloaded and installed the latest Anaconda (Windows 10, Python 3.9). image

Then I downloaded this CloudComPy binaries: image

Then I've done all selected on screenshot steps (changing only python version and thus also names to "...39") image

Unfortunately, when running .bat file image

It throws up this message: image

I don't get why it tells me that I have not activated the Conda environtment :/

It seems to me that the environment is done correctly and in anaconda promt I'm activating it correctly: image

I'm new to whole conda stuff, so forgive me if I'm doing something stupid

djdan7 commented 1 year ago

What mean "Install the binary in the directory of your choice."? image

In the "CloudComPy39_20220719.7z" zipped folder I don't see any .exe file or other installation file: image

djdan7 commented 1 year ago

OK, I've done everything one more time, using the newest binaries, with Python 3.10 and now the test shows "Environment OK" :)

prascle commented 1 year ago

OK, I've done everything one more time, using the newest binaries, with Python 3.10 and now the test shows "Environment OK" :)

Oh, I was just writing a reply suggesting that!

If you want to free up some disk space, you can delete your previous CloudComPy39 environment with

conda remove -n CloudComPy39 --all

"Install the binary in the directory of your choice" only means unzipping the zipped folder wherever you want! Already done!

Avi1git commented 1 year ago

Hi @prascle,

I am trying to achieve the same as djdan7 initially wanted, primarily because I use Eclipse(PyDev) for Python development. Therefore I opted for the Plugin option here.

After installing (I have the software version v2.13.alpha[64 bit]), I see Python 3.8 available under Programs/CloudCompare/plugins. I point Eclipse to this interpreter and try to import pycc, cccorelib, cloudComPy...but to no avail!

What am I missing? I would really like to use cloudComPy, which seems to wrap the other two with more friendly interfaces (am I right or are all 3 very different from each other?), but I would settle for what is practical.

My hesitation to use Conda is for reasons similar to djdan7 and due to my preference of Eclipse.

Please advise.

prascle commented 1 year ago

Hi @Avi1git,

CloudComPy and CloudCompare-PythonPlugin are two independent projects: CloudComPy is not built upon CloudCompare-PythonPlugin. CloudComPy is built upon a patched version of CloudCompare. Now, I am afraid the only easy way to install CloudComPy is through conda packaging.

I already use Eclipse and pydev as a development tool, mainly to edit C++ and Python code of CloudComPy and CloudCompare, but not to execute the code.

I'm still thinking about a better way to package CloudComPy, and my first ideas are to finish integrating CloudComPy as a conda package, or to work on pip packaging which is probably more complex. I think that using a Python virtual environment allows for many user configurations to be covered, as many Python users deal with many Python packages and want to be able to easily switch environments depending on their projects.

I'm interested in getting information about user environments, what they use for their complex Python projects, and what they would like for CloudComPy integration. All ideas are welcome!

Regards, Paul