DevMiser / DaVinci

DaVinci - The ChatGPT AI Virtual Assistant
150 stars 21 forks source link

Issue with pip3 install, help please? #21

Open thamm98 opened 7 months ago

thamm98 commented 7 months ago

when I try running pip3 install, I get the following error message:

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.

If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.

See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider.

DevMiser commented 7 months ago

The newest RPi OS does not currently play nice with pip. You can work with a virtual environment. Alternatively, the following is a quick fix: Open at terminal and enter the command: python--version Write down the python version shown. You only need the number before and after the first dot, so if it returns Python 3.9.2 for example, write down 3.9 Next in your terminal enter the command: cd /usr/lib/python[add your number] An example would be: cd /usr/lib/python3.9 Then enter the command: sudo rm EXTERNALLY-MANAGED And then reboot

thamm98 commented 7 months ago

Thanks for the quick reply, much appreciated, man your a genius!! Thanks again looking forward to the final run