It is generally not recommended to install packages globally in a virtual environment as it defeats the purpose of creating a separate environment with unique dependencies. However, if you really want to install packages globally in a virtual environment, you can do so by activating the virtual environment and using the system's package manager (e.g. apt for Ubuntu):
source path/to/venv/bin/activate
sudo apt install package-name
This will install the package globally on the system, but it will be available in the virtual environment as well since it is activated. However, it is recommended to use the virtual environment's package manager (e.g. pip) to install packages within the virtual environment.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2023-05-25 03:20:47 +0000
Seen: 13 times
Last updated: May 25 '23
Why does the WiX4 Bundle fail to install?
How can I install OmniSharp for Visual Studio Code without an internet connection?
What is the process for choosing which version to install when using dnf in Rhel 8?
When trying to install composer, why is Ubuntu unable to find the openssl package?
Why am I unable to install plugins on WP due to Error 403?
Is the library `Msys2` already installed on Chocolatey?
If I am unable to install an app from Google Play, how can I detect any errors?
What is meant by the term "Install" in a Chocolatey package?
What steps should I follow to have apt-get install the most recent version of Boost?