Plugin Manager - PIP

For some reason it's not printing out the debug output that I expected it to print out, and I can't look into this right now I fear because I have my hands full with prepping 1.3.7rc1.

It certainly isn't liking something about your installation, I just have no idea what, sorry.

Hi Gina
Yes, I believe that's it. It does not like Knoppix 8.1's python install.
I did have to install python-dev in unstable mode, but python-pip, that installed without issue.

Do we know what version of pip, octoprint likes? Perhaps I can track it down.
Or is pip not the problem and the real problem is python?

If it only effects the pluggin manager, this issue can be left on the back burner and
revisited at a later date.
Thanks again for your help.
Michael B

pip 9.0.1 is usually fine. It's not pip, it's not python, it's something about how both of them play together here and probably what output a test package install produces that the pip utility performs in order to figure some stuff out about the environment it's facing.

Hi Gina
So the startup runs a test package install and checks the results.
Based on what it sees in the result, it then decides the installation is kosher or not and
Knoppix 8.1 does not come up kosher. I am way out of my depth here.
In order to sort this one, I suspect you'd need a copy of the source code and
be running a trace over the startup to match source code to trace and see what emerges.
Not an easy debug.
Michael B.

I guess I shouldn't let you see what shenanigans I get up to with octoprint then (more or less my own version of octopi, but on armbian instead of raspbian, hacked up daemon scripts and all). Although, come to think of it, you probably have seen at least some of my shenanigans.

I'll put knoppix in a VM and see if it still does the same thing, I remember with Armbian I had a few issues with packages that weren't installed (packages that were there on raspbian). It's probably another case like that.

1 Like

Just took another look at the code and have a hunch what might be up here. Contrary to my earlier statement the LocalPipCaller that's reporting a problem here here isn't actually installing a test package (that would be the default for PipCaller) but instead only checking some parameters itself. The "Cannot use pip" message there should only ever be produced in a virtual environment if the install directory associated with the virtual environment isn't writable.

1.3.7 will also have better logging there:

https://github.com/foosel/OctoPrint/commit/82dffa50f72defcdfaf03dbfbdc737c9355f650e

So my money would be on you having wrong permissions set on your /home/knoppix/octoprint/venv folder. Used sudo at the wrong moment by any chance?

Best make sure that the venv does belong or at the very least is writable by the user you are running OctoPrint under (knoppix?). See also

https://discourse.octoprint.org/t/i-cannot-update-switch-branches-or-install-plugins-i-get-something-about-permissions/209

(Yes, says "OctoPi" in there, but is also true for other distros)

RE my attempt at putting it in a VM, I'm assuming I also ran into some sort of write-only issue because any attempt to use apt-get to install anything resulted in errors.

@MichaelBlucher I highly suggest you switch to linux Mint, I've had great success at installing octoprint (trouble free) under Mint, and is where I actually write all my plugins. Only time I've ever seen that "can't find pip" error is when I mess about and change branches or actively change something in octoprint and don't clean up after myself (and occasionally when first resuming the VM from suspend).

Hi foosel,
first - thanks for answer!
I use a banana pi. Kernel 3.4.111-bananian, Debian 8 (jessie).
I have made only the update from version 1.3.5 to 1.3.6 nothing other changes or modifing. Other have this problem also with update from 1.3.4. Whats the reason that 1.3.6 can't find pip? :confused:

After create a alias the pip commend is found BUT not from the plugin manager, hmmm.
All installation steps describe exactly after 3 month ? - impossible :flushed:
I think I have used the update process how described https://github.com/foosel/OctoPrint/wiki/Setup-on-a-Raspberry-Pi-running-Raspbian point "Updating & Switching Branches"
Is there a way to check the pip command how used in the plugin manager, respectivly the expected path ?

Kindly regards
Rabis

@Rabis I've moved this here since it got off topic in the other thread.

Your problem sounds like a possible permission issue, please check this earlier post:

https://discourse.octoprint.org/t/pluggin-manager-pip/310/18?u=foosel

Hi PythonAteMyPerl
I did look at Linux Mint. I wasn't keen on the flavor.
I ended up deciding on PC -Linux or Knoppix.
PC-Linux missed out due to it have problems with random lockups.
Michael B.

Hi Gina
Pretty sure I didn't. I tend to follow instructions verbatim unless told otherwise
All the folders under /home/knoppic/octoprint (inclusive) have permissions drwxr-xr-x.
Are the permissions correct?
Do I need to tweak them?
Michael B.

you need to find out who the owner / group is for those folders, it should be "knoppix knoppix", if any of them have "root" as the owner or group, permissions are broken.

Knoppix is the user login that comes with knoppix.
I have no idea what owner / group it belongs to.
I have little knowledge in this area.
Michael B.

Luckily google is my friend
:slight_smile:

yes knoppix is the user you log in with, but if you created any of the files / folders using "sudo" then the owner will probably be "root".

If you've never used linux before, and have no clue how it's file permission systems work, a manual install of OctoPrint should be considered an advanced task. I would highly suggest you take the time to go through some youtube tutorials and do some reading on how to actually use linux command line tools. Figuring out file permissions is one of the most basic tasks you can do in linux.

Felix from The Ben Heck Show has a "Sudo Sergeant" segment where he goes through a few linux tools, he also has one one file permissions: https://www.youtube.com/watch?v=p7GZiwhEw9Q&index=7&list=PLwO8CTSLTkijXK3NcIT-_aRkEyRO3aJK6

This is my first foray into Linux since Slackware 3 in the 1990's.
So a lot of my previous knowledge has atrophied.
Google is refreshing my memory, so its slowly coming back.

I think Gina is right. I must have sudo'd in the wrong place.
Can't remember doing so, can't see it in my notes, but it must be the case.

Chown and chgrp will help me clear up the mess.
Michael B.

Everything under /home/knoppix/octoprint (inclusive) is owner group:
knoppix knoppix

All folder permissions are: drwxr-xr-x
Contents of /home/knoppix/octoprint/venv/bin have permissions: rwxr-xr-x
except symbolic links which are: lrwxrwxrwx
Michael B.

Hi Gina

I just deleted my octoprint install and re-installed it completely from scratch.
I made sure all instructions were followed as listed. No errant sudo's.

The result is exactly the same. Octoprint does not like pip.

If it is permissions, it's something peculiar to Knoppix 8.1.

Is there a manual override for pip? Some way around the pip test?

Michael B.

I'll be pushing out 1.3.7rc1 hopefully early next week, that will add better logging to this whole pip detection thing. Maybe that will shed some more light on things.

The interesting path for permissions would btw be /home/knoppix/octoprint/venv/lib/python2.7/site-packages, if I'm not mistaken. That should at least be what

/home/knoppix/octoprint/venv/bin/python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"

prints out. Please verify that and verify the permissions on the path that this command prints out.

Finally, I have to agree with @PythonAteMyPerl here - it feels like you might be in a bit over your head, considering that you are trying to get OctoPrint to run on a fairly uncommon distribution with somewhat rusty Linux experience that know one here has any experience with. This is and will in all likelihood continue to be a quite frustrating experience. Getting yourself an RPI and just throwing OctoPi on it would be far less painful.

Edit while we are at it, let's collect some more information:

/home/knoppix/octoprint/venv/bin/python -c "import sys; print(getattr(sys, 'real_prefix', None))"
/home/knoppix/octoprint/venv/bin/python -c "import site; print(site.ENABLE_USER_SITE)"

If you decide to abandon Knoppix 8.1, using your Banana Pi Pro with Rasbian is still a manual install because I don't believe OctoPi supports the Banana Pi Pro.