CloudCompare / CloudComPy

Python wrapper for CloudCompare
Other
292 stars 41 forks source link

Running envCloudComPy.bat before every use #47

Open pras9898 opened 2 years ago

pras9898 commented 2 years ago

Hi,

Sorry if this is a silly question, I am still relatively new to this.

I can only import cloudcompy after I run envCloudComPy.bat each time I access the CloudComPy39 environment. Is that what it is supposed to do or is there a way to not have to do this every time and I can just use python straight away after I activate the environment?

I am currently operating on windows 10. Please let me know if you need more info.

Thanks!

prascle commented 2 years ago

Well, I'm not a specialist of Windows environment and batch files, I guess it's possible to build something to launch the Conda terminal with a complete environment for CloudComPy, with one click from the desktop (or a command), but I don't know how to do it. The only improvement I can suggest is to create a small test.bat script in your user HOME, with

call C:\Users\paulr\CloudComPy\install\CloudComPy39\envCloudComPy.bat
conda activate CloudComPy39

(with the correct path of envCloudComPy.bat, depending on your installation). You just have to launch the conda prompt, then : test.bat You can add a cd myproject command in the script or other environment sets, but before the conda activate command. Maybe someone else can come up with something better! Paul

pras9898 commented 2 years ago

Well, I'm not a specialist of Windows environment and batch files, I guess it's possible to build something to launch the Conda terminal with a complete environment for CloudComPy, with one click from the desktop (or a command), but I don't know how to do it. The only improvement I can suggest is to create a small test.bat script in your user HOME, with

call C:\Users\paulr\CloudComPy\install\CloudComPy39\envCloudComPy.bat
conda activate CloudComPy39

(with the correct path of envCloudComPy.bat, depending on your installation). You just have to launch the conda prompt, then : test.bat You can add a cd myproject command in the script or other environment sets, but before the conda activate command. Maybe someone else can come up with something better! Paul

Hi Paul,

Thanks for you help. I also found another workaround which involves editing the batch file to do 'setx' commands instead of 'set' which permanently secures the paths.