Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use venv to resolve error: externally-managed-environment #190

Merged
merged 9 commits into from
Apr 26, 2024

Conversation

liyipeng3
Copy link
Contributor

@liyipeng3 liyipeng3 commented Apr 26, 2024

This patch try to resolve externally-managed-environment error by using separate venv.

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.

See also:

@Yikun Yikun changed the title fix: The directory '/github/home/.cache/pip' or its parent directory is not owned or is not writable by the current user. Use venv to resolve error: externally-managed-environment Apr 26, 2024
Copy link
Owner

@Yikun Yikun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感谢贡献。我把commit message改了下。

粗略看了下原因,应该是ubuntu的base镜像进行了更新,引入了https://peps.python.org/pep-0668/ 这个为了解决OS软件包和python冲突的机制。

通过venv解决是合理的。

@Yikun Yikun merged commit f88730a into Yikun:master Apr 26, 2024
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants