I am having issues with downloading the openai python module onto a raspberry pi 5. I know I'm supposed to download in a virtual environment first then deactivate and download globally but that hasn't work and I still get this error: "
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 "
I've already done the steps in this article: https://www.tomshardware.com/how-to/install-python-modules-raspberry-pi
Help would be much appreciated, thanks.
-
Start off by saying WHAT YOU ARE trying to do. What you claim in the first paragraph is NOT true. See Tour to see how this site works and How do I ask a good question?Milliways– Milliways2024年09月20日 23:16:31 +00:00Commented Sep 20, 2024 at 23:16
-
@Milliways Chill man I'm new to this stuff. And not sure what you mean by my first paragraph being untrue. All instructions and documentation I've seen say to do that process.Christian Archer– Christian Archer2024年09月30日 17:48:12 +00:00Commented Sep 30, 2024 at 17:48
1 Answer 1
If you are trying to install something using pip
see the instructions
This is an issue with python 3.11 (which is well documented and extensively discussed) which requires pip to use a virtual environment.
Example (setting up a virtual environment in directory cp):-
mkdir cp && cd cp && python -m venv --system-site-packages env
-
how do you get rid of this venv thing, it really hampers development. now you have to spend hours doing this busy workFight Fire With Fire– Fight Fire With Fire2024年11月01日 22:46:13 +00:00Commented Nov 1, 2024 at 22:46