ln-12 / blainder-range-scanner

BlAInder range scanner is a Blender add-on to simulate Lidar and Sonar measurements. The result can be saved as annotated 2D image or 3D point cloud.
GNU General Public License v3.0
128 stars 25 forks source link

Error when trying to install dependencies (Linux) #25

Open joshm42 opened 1 year ago

joshm42 commented 1 year ago

Bug Description: When installing the range scanner add-on it tells me there are missing dependencies. Upon hitting the "Install dependencies" button I receive the following output in the console:

"ERROR: Command '['/snap/blender/3082/3.4/python/bin/python3.10', '-m', 'pip', 'install', 'Jinja2==3.0.2']' returned non-zero exit status 1"

However, I can manually use that same python binary / pip to install Jinja2 and all of the other dependencies in the Readme. Despite being able to see them all listed in Blender's instance of pip (using pip list with the Blender python executable) the add-on still does not see them and still requires the "install dependencies" button to be pressed repeating the error.

When I run the subprocess command directly in Blender's console (command: subprocess.run([sys.executable, "-m", "pip","install", "Jinja2==3.0.2"],check=True) it does not error out and instead has "returncode=0". Despite this, the "missing dependencies" notice does not go away in Scanner tab.

To Reproduce: 1) Snap install Blender (currently snap is installing Blender 3.4.0) 2) Launch Blender using the terminal 2) Download the Blainder repository 3) Extract all files and zip range_scanner folder 4) In Blender's add-on menu select the range_scanner zip folder 5) Select "Scanner" from tab and press "Install dependencies" 6) See output error in terminal

Expected Behavior: I have used this add-on with Blender 2.93.9 on a Windows 7 machine and the add-on installs dependencies fine. I now need the developed pipeline to run on a Linux machine which is resulting in the error described above.

Desktop: -OS: Linux 20.04.5 -Blender 3.4.0

ln-12 commented 1 year ago

I once tested the installation as a snap package, but it did not work for me as these packages cannot be altered after installation. Please use the method described in the readme instead.

joshm42 commented 1 year ago

I completely removed the snap installation and followed the steps listed under "For script usage" with the exception of installing Blender 3.4.0 instead of 2.93.6 (still installing through the tar). I ended up with the same error describe originally when I tried to select the Scanner tab in Blender. This seems to indicate the issue is outside of using snap to install Blender.

To see if it was an issue with using Blender 3.4 I also repeated the installation for 2.93 and that worked (again, using tar source). I am not very familiar with what changed between Blender 2.93 and Blender 3.4 when it comes to installing pip packages / dependencies. However, currently it seems to be something in that change causing the issue.

ln-12 commented 1 year ago

Alright, thank you for testing it out. I will have a look at it, when I got some time.