Raspberry Pi 5

Resolving externally-managed-environment errors on Raspberry Pi 5

GoldenPig1205 2024. 1. 8. 23:55

There are two solutions, but before solving this, you should know that Debian 12 recommends using a virtual environment (venv) when using Python. It is presumed that it was blocked on purpose, but the solution is actually very simple.

At the top it says error: externally-managed-environment.

 

1st way. Use virtual environment

cd [Path where you want to install venv]

 

python3 -m venv venv

 

source /venv/bin/activate

or

python3 -m venv [path you want]

 

source /[path you wanted]/bin/activate

 

2nd way. Ignore

sudo rm -rf /usr/lib/python3.11/EXTERNALLY-MANAGED
반응형