psa_car_controller icon indicating copy to clipboard operation
psa_car_controller copied to clipboard

Installation problem

Open Easyrunner opened this issue 1 year ago • 1 comments

On a Pi4 with Bookworm I installed Python like in the description. After the installation command of PSA-car-controller I get following:

`pi@Pi4-4GB:~ $ pip3 install -r psa-car-controller error: externally-managed-environment

This environment is externally managed

To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install.

If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed.

For more information visit http://rptl.io/venv

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. `

Also sudo does not helps.

Easyrunner avatar Feb 28 '24 07:02 Easyrunner

The explanation is already in your bug report above, this is mostly a documentation issue of psa-car-controller. It's not recommended to install Python packages (or any other 3rd party packages!) bypassing your OS's tools. As there is no Raspberry Pi OS package, however, you have two options:

  • install into a Python virtual environment
  • force installation.

It you're willing to learn about Python virtual environments, here's a short summary:

  • create it using "python3 -m venv some_path"
  • activate it using "source some_path/bin/activate"
  • continue to install psa-car-controller using pip as described
  • Whenever you want to start psa-car-controller, be sure to activate the venv first as descirbed above

If you want the quick & dirty forced install and don't care about a clean Raspbian installation, just use "pip --break-system-packages" as also written above. :-)

gernot-h avatar Mar 09 '24 05:03 gernot-h