错误信息:
\n\nRun Code Online (Sandbox Code Playgroud)error: externally-managed-environment\n\n\xc3\x97 This environment is externally managed\n\xe2\x95\xb0\xe2\x94\x80> To install Python packages system-wide, try apt install\n python3-xyz, where xyz is the package you are trying to\n install.\n\n If you wish to install a non-Debian-packaged Python package,\n create a virtual environment using python3 -m venv path/to/venv.\n Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make\n sure you have python3-full installed.\n\n If you wish to install a non-Debian packaged Python application,\n it may be easiest to use pipx install xyz, which will manage …
命令:
\npip install -r requirements.txt\nRun Code Online (Sandbox Code Playgroud)\n输出:
\nerror: externally-managed-environment\n\n\xc3\x97 This environment is externally managed\n\xe2\x95\xb0\xe2\x94\x80> To install Python packages system-wide, try apt install\npython3-xyz, where xyz is the package you are trying to\ninstall.\n\nIf you wish to install a non-Debian-packaged Python package,\ncreate a virtual environment using python3 -m venv path/to/venv.\nThen use path/to/venv/bin/python and path/to/venv/bin/pip. Make\nsure you have python3-full installed.\n\nIf you wish to install a non-Debian packaged Python application,\nit may be easiest to use pipx install xyz, which will manage a\nvirtual environment …Run Code Online (Sandbox Code Playgroud)