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

Prevent package installs in the root environment #4929

Closed
Tracked by #11342
nelson-liu opened this issue Mar 24, 2017 · 8 comments
Closed
Tracked by #11342

Prevent package installs in the root environment #4929

nelson-liu opened this issue Mar 24, 2017 · 8 comments
Labels
locked [bot] locked due to inactivity source::community catch-all for issues filed by community members stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity type::feature request for a new feature or capability

Comments

@nelson-liu
Copy link
Contributor

Hi,
When I used to use virtualenv I was a big fan of using the PIP_REQUIRE_VIRTUALENV flag, which stipulates that any pip install commands must be run in a virtualenv in order to work. The rationale for this was to avoid polluting the global package space.

Too often, I find myself absentmindedly forgetting to activate my conda environment and {pip|conda} installing something. It'd be great to have a similar flag in conda to prevent this from happening, and block me from installing packages in the root environment.

Alternatively, it'd be great to know of a way to reset the root environment to the default state (I couldn't find anything solving this when i looked online), to quickly clean up the global package space without {pip|conda} uninstalling every single package.

Thanks! Conda has been great for me, but this is a big feature (to me) that I sorely miss from my old virtualenv/pip setup

@nelson-liu nelson-liu changed the title Prevent package installs in the root directory Prevent package installs in the root environment Mar 24, 2017
@kalefranz
Copy link
Contributor

I appreciate this feature request. I think it's a great idea. We'll keep it in mind..

@kalefranz kalefranz added the type::feature request for a new feature or capability label Mar 24, 2017
@goanpeca goanpeca added the source::community catch-all for issues filed by community members label Mar 24, 2017
@H0R5E
Copy link

H0R5E commented Apr 11, 2017

I think this is a great idea, particularly because I have noticed that environments used on Windows seem to be able to pick up packages in the root environment sometimes. This has caused me a lot of confusion when I have inadvertently installed something to the root environment which I did not intend to.

Could it be extended to prevent setuptools installs as well?

@kalefranz
Copy link
Contributor

possibly related: #4943

@scottdraves
Copy link

totally wish for this feature.

@msarahan
Copy link
Contributor

You might be interested in the standalone executables: https://repo.anaconda.com/pkgs/misc/conda-execs/

@github-actions
Copy link

github-actions bot commented Aug 19, 2021

Hi there, thank you for your contribution to Conda!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this issue to remain open please:

  1. Verify that you can still reproduce the issue in the latest version of Conda
  2. Comment that the issue is still reproducible and include:
  • What version of Conda you reproduced the issue on
  • What OS and version you reproduced the issue on
  • What steps you followed to reproduce the issue
  1. It would also be helpful to have the output of the following commands available:
  • conda info
  • conda config --show-sources
  • conda list --show-channel-urls

NOTE: If this issue was closed prematurely, please leave a comment and we will gladly reopen the issue.

In case this issue was originally about a project that is covered by the Anaconda issue tracker (e.g. Anaconda, Miniconda, packages built by Anaconda, Inc. like Anaconda Navigator etc), please reopen the issue there again.

Thanks!

@github-actions github-actions bot added the stale [bot] marked as stale due to inactivity label Aug 19, 2021
@scottdraves
Copy link

please re-open, still valid afaik

@github-actions github-actions bot removed the stale [bot] marked as stale due to inactivity label Sep 6, 2021
@github-actions
Copy link

github-actions bot commented Sep 7, 2022

Hi there, thank you for your contribution!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this issue to remain open please:

  1. Verify that you can still reproduce the issue at hand
  2. Comment that the issue is still reproducible and include:
    - What OS and version you reproduced the issue on
    - What steps you followed to reproduce the issue

NOTE: If this issue was closed prematurely, please leave a comment.

Thanks!

@github-actions github-actions bot added the stale [bot] marked as stale due to inactivity label Sep 7, 2022
@github-actions github-actions bot added the stale::closed [bot] closed after being marked as stale label Oct 8, 2022
@github-actions github-actions bot closed this as completed Oct 8, 2022
@github-actions github-actions bot added the locked [bot] locked due to inactivity label Oct 8, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity source::community catch-all for issues filed by community members stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity type::feature request for a new feature or capability
Projects
None yet
Development

No branches or pull requests

6 participants