Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional Python modules for some Tools can no longer be installed via PIP as instructed #477

Open
dJOS1475 opened this issue May 27, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@dJOS1475
Copy link

Problem
The various instructions to install prerequisites for ecowitt and tesla history (and maybe others) are no longer correct on Ubuntu 22.x +

To Reproduce
Attempt to install python modules: dateutil teslapy influxdb etc

pip install python-dateutil teslapy influxdb

Screenshots

SCR-20240527-ojnm

Host System

  • OS Ubuntu 22.x +

Additional context
The workaround is to add --break-system-packages
eg
pip install python-dateutil teslapy influxdb --break-system-packages

@jasonacox jasonacox added documentation Improvements or additions to documentation enhancement New feature or request labels May 27, 2024
@jasonacox
Copy link
Owner

Thanks @dJOS1475

I flagged this for documentation so we can update with those helps. However, using --break-system-packages is probably not the best option for everyone. There are a few other options:

Docker

We could have the tools run inside of docker with its own python environment already set up. @mcbirse Didn't we already set this up? Perhaps we change the tool runs to be docker run instead.

Python Virtual Environment

A recommended approach (when you can't apt install packages which is most of them) is to create a python virtual environment:

sudo apt install python3-venv
python3 -m venv .venv
source .venv/bin/activate
pip install python-dateutil teslapy influxdb 

You would need to source .venv/bin/activate for any session that needed to use those installed libraries (eg. put it in ~/.bashrc or your cron script).

@dJOS1475
Copy link
Author

dJOS1475 commented May 27, 2024

Cheers, I was able to apt install everything except teslapy and had to resort to the brute force method for that. I run my dashboard in a dedicated vm, so I wasn’t bothered if I broke it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants