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

Install CloudComPy with pip in a virtual environment #13

Open
ttsesm opened this issue Dec 9, 2021 · 4 comments
Open

Install CloudComPy with pip in a virtual environment #13

ttsesm opened this issue Dec 9, 2021 · 4 comments

Comments

@ttsesm
Copy link

ttsesm commented Dec 9, 2021

Hi Guys,

Do you know whether it is possible to install CloudCompPy and have a python binding with pip in a virtual environment? My plan is to compile it from source and then possibly getting a setup.py should do the trick.

However, I am not sure whether it would work or you have tried to install the lib that way.

Thanks.

@prascle
Copy link
Collaborator

prascle commented Dec 9, 2021

Hello,
Compiling CloudComPy with a setup.py and using pip is indeed something I would like to do. I haven't tried it yet, it's an area where I still have a lot to learn.
It's probably doable, but I'd start by limiting the CloudCompare plugins to the bare minimum.
Depending on the platform, there are compatibility problems between the different prerequisites or with CloudCompare that can result in compilation problems or bugs at runtime. This is what I have noticed in my different builds on Windows and Linux.
I intend to increase my skills on this subject and if you already have experience in packaging with pip, your contribution is welcome.
Regards,
Paul

@ttsesm
Copy link
Author

ttsesm commented Dec 9, 2021

Hi Paul,

Thanks for the feedback. To be honest, I do not have a direct experience with something like that as well. However, looking on some other projects that I was working with lately and how they do it, I guess I would follow a similar approach and possibly go with pybind11 as well. It seems a straight forward approach.

I guess then you need to modify accordingly the CMakelists.txt file and possibly to do some binding to the C++ functions or something similar and it should work.

@prascle
Copy link
Collaborator

prascle commented Dec 9, 2021

Yes, switching to pybind11 instead of Boost.Python is probably a step that will make pip packaging easier. This is one of the things I need to look into. I don't have a clear idea of how much effort goes into adapting or rewriting the interface, but I think it's a pretty systematic transposition, pybind11 started from Boost.Python.
The impact on the CMakeList.txt should be minimal. The C++ Python binding is indeed the object of CloudComPy, I've been driving it manually so far to keep the Python interface fairly simple, matching the CloudCompare command language, and I'm enriching the interface as needed.

@s-du
Copy link

s-du commented Mar 22, 2023

Hi, I was wondering if there is any further feedback regarding this. I would really love to install CloudCompy in a venv, without needing Anaconda. Does anyone knows if it is achievable?

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

3 participants