Plugin Manager - PIP

@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.

Hi b-morgan
The Banana Pi Pro came with Bananian, I'd have to build a micro-SD card with Rasbian.
It was also bought for my Son to play around with. Trying to get him off computer games.
Which he did for about a day or so, then he went back to playing computer games.
So technically its my Son's Banana Pi Pro sitting on the shelf. I'd need his permission to use it.
Michael B.

Hi Gina
I'll run those instructions tonight when I get home from work.
Thanks again.
Michael B.

Hi Gina

With regards my choice of Knoppix, there was a certain logic behind the choice.

I wanted a version of Linux that could be highly portable (i.e. run off a laptop and/or USB stick).
So I started with quite a few flavors of Debian, as Debian was highly regarded.
Of all the distributions I looked at, they fell into 2 basic camps.

Those that were easily made into USB boot sticks and 2 that were not so easy.

Ubuntu, Mint, Elementary, Puppy, TAILS and TENS were easy.
However, the last 2 I found were more special purpose, so not really applicable. I have other uses for them.
The first 4 had a limitation in persistence set at 4gb, so would have to be HD installed first and
then re-placed back onto USB boot stick. That little part is not as easy.

The 2 that were difficult to put on USB boot stick, had to be HD installed first.
However, once HD Installed they were surprisingly easy to put back on a USB boot stick.
They were Knoppix and PC Linux.
I found PC Linux suffered from nasty random lockups caused by hardware incompatibility issues.
So Knoppix was chosen. It also has a very good hardware sniffer, which makes it highly portable.
Perhaps I should have used the version prior to 8.1, which may have been more stable.

Anyway, that was the logic behind the choice.
The end result should be a laptop capable of driving a 3D printer and later a 15 inch Telescope.
Once all setup, I'll write everything back to a 64gb USB stick and be able to boot on almost anything Intel based. That's the theory anyway,

Michael B.
Note: I used SD cards and USB / SD converter stick. So I can boot any of the distros I've been toying with.

Hi Gina

Folder: /home/knoppix/octoprint/venv/lib/python2.7/site-packages
All folders have permissions: drwxr-xr-x
All non-folders have permissions: -rw-r--r--

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

Comes back with:
/home/knoppix/octoprint/venv/lib/python2.7/site-packages

Commands:

/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)"

Comes back with:

/usr
False

Hope that helps.

Michael B.

Look into a program called UNetbootin https://unetbootin.github.io/ may or may not be of any use to you now but it's still a handy thing to have for making quick usb boot disks.

Last thing to test:

/home/knoppix/octoprint/venv/bin/python -c "import os; can_write=os.access('/home/knoppix/octoprint/venv/lib/python2.7/site-packages', os.W_OK); print(repr(can_write))"

I'm expecting this to come back with a False because based on the output of the other commands that's the only thing that could make pip discovery fail here.

If it does indeed come back with False, please provide the full output of these three commands (make sure your OctoPrint server that's complaining about pip is actually running):

ls -ld /home/knoppix/octoprint/venv/lib/python2.7/site-packages/
id
ps -ef | grep -i octoprint

Hi PythonAteMyPearl

The windows utilities for burning images to USB are bit of a hit and miss. I've used the following:
LinuxLive USB Creator
Rufus
UnetBootin-Windows
Universal-USB-Installer
WinToUSB

Your suggestion is in the middle there.
I found that some of the USB tools above, worked with some Distros and some did not and
they are also in some cases distro version dependent.
So I had to work which of the above, worked with which distros.
I had a chart written down, utility to distro, but I have misplace (lost) that.

All of the utilities had persistence limited to 4GB and none worked with Knoppix 8.1 or PC Linux.
To create USBs for Knoppix 8.1 and PC Linux I had to use the tools those distros provided,
i.e. Flash Knoppix.
Michael B.

Hi Gina

I'll apply those commands tonight when I get home from work.
Please note. My laptop is at home and home is 1 hours drive away from work.

There is something else I might check while I'm at it.
I remember seeing a size difference for "pip" installed on Knoppix and the one in "Octoprint/venv/bin".
The pip in "Octoprint/venv/bin" was (if I remember correctly) 230bytes. The pip in /usr/bin? was larger.
I'll check that tonight as well. Perhaps a clash of versions?

And thank you so much for your assistance and your patience, these are greatly appreciated.

Michael B.
P.S.
I have noticed other issues with Knoppix 8.1, for instance I had to fix Slic3r before it would run.
I may have to ask Klaus Knopper if he has any updates/fixes that can be applied.