-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
The use of sudo pip3 appears to be causing issues #173
Comments
And this for reference |
Thanks @borpin |
Hello @borpin I think the issue here is that we create an emonhub user to run emonhub and Im pretty sure that user cant access pip modules installed in say the 'pi' user context. I think it's important to be able to run emonhub in the main user context, it's useful for testing among other things. So I wonder if the best solution is to drop the emonhub specific user and install emonhub and service file using the main user context? |
OK, but there are other ways to solve that. Install it (and update it) as a global package I think will work. I think using The tricky bit will be migrating installations from |
Is there an obvious way to install pip packages globally without using sudo?
do you know what the solution is? |
From what I can tell searching online and looking at the pip3 install help it's not clear.. |
For me when you use Many projects dont have the apt package up to date because it is a lot of work for maintainers, eg pymodbus, and so if yu want a fresh version, yu have to install them with So using the user |
But it is not the right way to do it, and can cause issues and raises errors. I think the right way is to use venv, but I have no idea how :( However, moving to a venv could have the advantage of making the update process easier. |
Ok it is not the good practise to do that in the case of emonhub, why is a specific user needed ? a global package is only needed because emonhub is running with a specific user. For maintenance, as other services run under the pi user like the service runner, the feedwriter, the emoncms_mqtt, the simpliest choice is to run emonhub with the pi user. Why making a different choice for emonhub ? And therefore yu dont need anymore neither a global package neither yu need to do sudo pip3 |
I agree that the simplest solution is to move emonhub to the main users username, keeps things simple and consistent with how we handle the other services. |
Nor do I, I guess Im drawn to the solution that I understand already. |
Ok, I've got this working and pushed to master 988b4c2 |
Does it upgrade gracefully? I was going to do a build on the new PiOS and see if there were the memory issues. Have you made any other changes for the new OS image? |
As part of this, should we install/update pip from Python then call it from Python? |
Yes upgrade appears graceful as far as I can tell so far.
The main change is php8.1 + associated redis and mosquitto-php builds. |
Could do, is that to get a newer version? |
Maybe. As you say the docs/advice looks confused. The main Pi OS pages still say to use no I think leave as is. I saw on one of the updates I did it was saying about a newer version of pip. |
ok great thanks! |
emonhub/install.sh
Line 29 in f286e18
https://community.openenergymonitor.org/t/emonhub-paho-mqtt-fails-to-install/20522/
pypa/pip#9348 (comment)
The text was updated successfully, but these errors were encountered: