regcs / AliceLG

A Blender add-on for the use of Blender with the Looking Glass holographic displays.
GNU General Public License v3.0
104 stars 23 forks source link

Installation error on linux: pip not found #63

Closed timostrating closed 3 years ago

timostrating commented 3 years ago

When installing I get as far as this point where I need to install the dependencies. But the button does nothing and does not give me any in editor errors. image

Steps to reproduce:

  1. Have pip and pip3 installed
  2. Install blender using snap
  3. Start up blender by opening a terminal and run /snap/bin/blender
  4. blenders default scene with cube opens.
  5. Open preferences and install add-on
  6. Enable add-on and open drop down
  7. Press red install button. (Nothing happens)
  8. look at console where you opened blender you see: /snap/blender/161/2.93/python/bin/python3.9: No module named pip
  9. Switch to blender and close application.
  10. Switch back to console. Run pip and pip3 to see that it is available in the console where you opened blender

Expected behavior: Error message at step 7 and the ability to find pip at step 7

System: xUbuntu 20.04 blender 2.93.0 installed from snap

Tried solutions:

  1. Making an alias for pip=pip3 (No differences)
  2. Running blender as admin (No differences)

(edit spelling)

regcs commented 3 years ago

@timostrating Thanks for the bug report and sorry for the late response. I was on holiday.

I don't have a linux system, so I can't try to reproduce it. Blender delivers it's own python version, which explains why your installed pip does not help. Could you show me, what files you have in /snap/blender/161/2.93/python/bin/?

timostrating commented 3 years ago

Owh no worries. I hope you had some nice holidays. I'm currently working on my master thesis so i'm not really active as well. image

I do not have a folder named 161 From a quick google search I found that the number is the revision number I only have 206, 830 and a link called current to 830. So that should just be fine. It contains python3.9 in both folders so it should all be correct.

Maybe its the way you call python from the code. I have some spare time next week so maybe I can play around in the code next week to find it.

image The python console in blender works fine and the info panel gives no warnings when you click that button so my best guess is still that it's a very small linux, windows difference thingy somewhere.

regcs commented 3 years ago

I had, thank you! :) Hope your master thesis is going on as planned!

I used the 161 since this was the number in the path of your very first post. Maybe you changed the blender installation in between!? Anyways, maybe you could try the following. On a normal console try the this command:

/snap/blender/current /2.93/python/bin/python3.9 -m ensurepip

It should install pip in Blender's python installation (on macOS and Windows it is installed by default, maybe it is not on Linux!?).

timostrating commented 3 years ago

yes that solved the problem, I have pip and pip3 both installed on my machine so I have no clue why this was needed but it works now Thanks

https://blender.stackexchange.com/questions/56011/how-to-install-pip-for-blenders-bundled-python It looks like more people have this problem and it's also not really clear if its bundled or not or a specific 2.93 problem

regcs commented 3 years ago

Thanks for confirming. I added the ensurepip call to the dependency installer for Linux now. I also don't now why PIP is not bundled with Blender's Python on Linux (it should, since it is on Windows and Mac!), but future versions of Alice/LG should now ensure that PIP is installed on its own.