Skip to content

Disable auto-installation of packages #311

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

Closed
Whatever314 opened this issue Apr 16, 2025 · 10 comments
Closed

Disable auto-installation of packages #311

Whatever314 opened this issue Apr 16, 2025 · 10 comments

Comments

@Whatever314
Copy link

The title is clear.

@karthiknadig
Copy link
Member

We don't auto-install unless you choose the option to auto install. There is also a skip installation option entirely skip installing packages. Can you provide more details or the flow where this occurred?

Image

@Whatever314
Copy link
Author

We don't auto-install unless you choose the option to auto install. There is also a skip installation option entirely skip installing packages. Can you provide more details or the flow where this occurred?

Image

how to open this view?

@karthiknadig
Copy link
Member

@Whatever314 That comes from create environment Command and selecting venv. Can you provide the details on what was installed?

@karthiknadig karthiknadig changed the title 🙃I want to disable auto-installation of packages, cos i'd rather do it by myself. Disable auto-installation of packages Apr 16, 2025
@Whatever314
Copy link
Author

Image
like this, happens when opening a workspace

@karthiknadig
Copy link
Member

@Whatever314 Can you share the logs from Output > Python Environments

@Whatever314
Copy link
Author

2025-04-16 23:22:46.225 [info] Starting Python Locator /home/$USER_NAME/.vscode-server/extensions/ms-python.vscode-python-envs-0.3.10991008-linux-x64/python-env-tools/bin/pet server
2025-04-16 23:22:46.225 [info] Using conda from persistent state: /opt/$SOME_PATH/bin/conda
2025-04-16 23:22:46.225 [info] Refreshing conda environments
2025-04-16 23:22:46.225 [info] uv 0.6.6

2025-04-16 23:22:46.335 [info] Refreshing Conda Environments
2025-04-16 23:22:46.335 [info] Refreshing conda environments
2025-04-16 23:22:46.478 [info] Discovered env: /home/$USER_NAME/.venv/bin/python
2025-04-16 23:22:46.478 [info] Discovered manager: (Conda) /opt/$SOME_PATH/bin/conda
2025-04-16 23:22:46.478 [info] Discovered env: /opt/$SOME_PATH/bin/python
2025-04-16 23:22:46.478 [info] Discovered env: /bin/python
2025-04-16 23:22:46.484 [info] Discovered env: /usr/bin/python
2025-04-16 23:22:46.484 [info] Discovered env: /bin/python3
2025-04-16 23:22:46.495 [info] Discovered env: /usr/bin/python3
2025-04-16 23:22:47.012 [info] Locator Conda took 181.431217ms
2025-04-16 23:22:47.013 [info] Locator Homebrew took 498.371µs
2025-04-16 23:22:47.025 [info] Locator LinuxGlobal took 268.357268ms
2025-04-16 23:22:47.030 [info] Locator PipEnv took 168.85µs
2025-04-16 23:22:47.030 [info] Locator Pixi took 158.23µs
2025-04-16 23:22:47.041 [info] Locator Poetry took 1.120371ms
2025-04-16 23:22:47.042 [info] Locator PyEnv took 1.10477ms
2025-04-16 23:22:47.046 [info] Locator Venv took 186.36µs
2025-04-16 23:22:47.046 [info] Locator VirtualEnv took 175.78µs
2025-04-16 23:22:47.048 [info] Locator VirtualEnvWrapper took 179.06µs
2025-04-16 23:22:47.068 [info] Locator GlobalVirtualEnvs took 76.390026ms
2025-04-16 23:22:47.091 [info] Locator Locators took 269.865208ms
2025-04-16 23:22:47.105 [info] Locator Path took 394.505588ms
2025-04-16 23:22:47.105 [info] Locator Workspaces took 73.814815ms
2025-04-16 23:22:47.113 [info] Using conda from cache: /opt/$SOME_PATH/bin/conda
2025-04-16 23:22:47.114 [info] Found base environment: /opt/$SOME_PATH
2025-04-16 23:22:47.117 [info] Terminal is activated: /opt/$SOME_PATH
2025-04-16 23:22:47.396 [info] Python API: Changed environment from undefined to base (3.9.16) for: /home/$USER_NAME
2025-04-16 23:22:47.396 [info] Internal: Changed environment from undefined to base (3.9.16) for: /home/$USER_NAME
2025-04-16 23:22:47.409 [info] Telemetry: {"event":"RefreshPerformance","data":{"refreshPerformance":{"total":394,"breakdown":{"GlobalVirtualEnvs":76,"Locators":269,"Path":394,"Workspaces":73},"locators":{"Conda":181,"Homebrew":0,"LinuxGlobal":268,"PipEnv":0,"Pixi":0,"Poetry":1,"PyEnv":1,"Venv":0,"VirtualEnv":0,"VirtualEnvWrapper":0}}}}
2025-04-16 23:22:54.750 [error] Shell execution timed out: /opt/$SOME_PATH/bin/conda activate base
2025-04-16 23:22:54.750 [info] Terminal is activated: /opt/$SOME_PATH
2025-04-16 23:22:54.750 [error] Shell execution timed out: /opt/$SOME_PATH/bin/conda activate base
2025-04-16 23:22:54.750 [info] Terminal is activated: /opt/$SOME_PATH
2025-04-16 23:22:54.750 [error] Shell execution timed out: /opt/$SOME_PATH/bin/conda activate base
2025-04-16 23:22:54.750 [info] Terminal is activated: /opt/$SOME_PATH
2025-04-16 23:23:10.624 [info] Discovered env: /home/$USER_NAME/.venv/bin/python
2025-04-16 23:23:10.624 [info] Resolved Python Environment /opt/$SOME_PATH/bin/python
2025-04-16 23:23:10.624 [info] Using conda from cache: /opt/$SOME_PATH/bin/conda
2025-04-16 23:23:10.624 [info] Found base environment: /opt/$SOME_PATH
2025-04-16 23:23:10.625 [info] Using conda from cache: /opt/$SOME_PATH/bin/conda
2025-04-16 23:23:10.634 [info] Discovered env: /bin/python
2025-04-16 23:23:10.634 [info] Discovered env: /usr/bin/python
2025-04-16 23:23:10.635 [info] Discovered env: /bin/python3
2025-04-16 23:23:10.635 [info] Discovered env: /usr/bin/python3
2025-04-16 23:23:10.635 [info] Locator Conda took 150.276371ms
2025-04-16 23:23:10.635 [info] Locator Homebrew took 2.887221ms
2025-04-16 23:23:10.635 [info] Locator LinuxGlobal took 243.255796ms
2025-04-16 23:23:10.635 [info] Locator PipEnv took 116.64µs
2025-04-16 23:23:10.635 [info] Locator Pixi took 79.09µs
2025-04-16 23:23:10.635 [info] Locator Poetry took 3.228241ms
2025-04-16 23:23:10.635 [info] Locator PyEnv took 1.25662ms
2025-04-16 23:23:10.635 [info] Locator Venv took 85.43µs
2025-04-16 23:23:10.635 [info] Locator VirtualEnv took 107.69µs
2025-04-16 23:23:10.635 [info] Locator VirtualEnvWrapper took 144.73µs
2025-04-16 23:23:10.635 [info] Locator GlobalVirtualEnvs took 47.588482ms
2025-04-16 23:23:10.635 [info] Locator Locators took 244.700856ms
2025-04-16 23:23:10.635 [info] Locator Path took 339.705592ms
2025-04-16 23:23:10.635 [info] Locator Workspaces took 42.59482ms
2025-04-16 23:23:10.638 [info] Telemetry: {"event":"RefreshPerformance","data":{"refreshPerformance":{"total":339,"breakdown":{"GlobalVirtualEnvs":47,"Locators":244,"Path":339,"Workspaces":42},"locators":{"Conda":150,"Homebrew":2,"LinuxGlobal":243,"PipEnv":0,"Pixi":0,"Poetry":3,"PyEnv":1,"Venv":0,"VirtualEnv":0,"VirtualEnvWrapper":0}}}}
2025-04-16 23:23:10.638 [info] Discovered env: /home/$USER_NAME/.venv/bin/python
2025-04-16 23:23:10.641 [info] Locator GlobalVirtualEnvs took 860ns
2025-04-16 23:23:10.641 [info] Locator Locators took 720ns
2025-04-16 23:23:10.641 [info] Locator Path took 820ns
2025-04-16 23:23:10.641 [info] Locator Workspaces took 2.951102ms
2025-04-16 23:23:10.641 [info] Found venv environment: .venv (3.11.9)
2025-04-16 23:23:10.660 [info] Telemetry: {"event":"RefreshPerformance","data":{"refreshPerformance":{"total":3,"breakdown":{"GlobalVirtualEnvs":0,"Locators":0,"Path":0,"Workspaces":2},"locators":{}}}}
2025-04-16 23:23:10.697 [info] Discovered env: /home/$USER_NAME/.venv/bin/python
2025-04-16 23:23:10.840 [info] Discovered manager: (Conda) /opt/$SOME_PATH/bin/conda
2025-04-16 23:23:10.840 [info] Discovered env: /opt/$SOME_PATH/bin/python
2025-04-16 23:23:10.840 [info] Discovered env: /bin/python
2025-04-16 23:23:10.840 [info] Discovered env: /usr/bin/python
2025-04-16 23:23:10.876 [info] Using conda from cache: /opt/$SOME_PATH/bin/conda
2025-04-16 23:23:10.903 [info] Discovered env: /bin/python3
2025-04-16 23:23:10.904 [info] Discovered env: /usr/bin/python3
2025-04-16 23:23:10.962 [info] Locator Conda took 155.599684ms
2025-04-16 23:23:10.962 [info] Locator Homebrew took 2.221361ms
2025-04-16 23:23:10.962 [info] Locator LinuxGlobal took 233.046231ms
2025-04-16 23:23:10.962 [info] Locator PipEnv took 112.17µs
2025-04-16 23:23:10.962 [info] Locator Pixi took 104.88µs
2025-04-16 23:23:10.962 [info] Locator Poetry took 709.27µs
2025-04-16 23:23:10.962 [info] Locator PyEnv took 823.64µs
2025-04-16 23:23:10.962 [info] Locator Venv took 134.19µs
2025-04-16 23:23:10.962 [info] Locator VirtualEnv took 427.11µs
2025-04-16 23:23:10.962 [info] Locator VirtualEnvWrapper took 25.74µs
2025-04-16 23:23:10.962 [info] Locator GlobalVirtualEnvs took 44.047261ms
2025-04-16 23:23:10.962 [info] Locator Locators took 235.759662ms
2025-04-16 23:23:10.962 [info] Locator Path took 310.175018ms
2025-04-16 23:23:10.962 [info] Locator Workspaces took 40.704059ms
2025-04-16 23:23:10.962 [info] Using conda from cache: /opt/$SOME_PATH/bin/conda
2025-04-16 23:23:10.963 [info] Found base environment: /opt/$SOME_PATH
2025-04-16 23:23:10.966 [info] Telemetry: {"event":"RefreshPerformance","data":{"refreshPerformance":{"total":310,"breakdown":{"GlobalVirtualEnvs":44,"Locators":235,"Path":310,"Workspaces":40},"locators":{"Conda":155,"Homebrew":2,"LinuxGlobal":233,"PipEnv":0,"Pixi":0,"Poetry":0,"PyEnv":0,"Venv":0,"VirtualEnv":0,"VirtualEnvWrapper":0}}}}
2025-04-16 23:23:11.004 [info] Python API: Changed environment from base (3.9.16) to base (3.9.16) for: /home/$USER_NAME
2025-04-16 23:23:11.004 [info] Internal: Changed environment from base (3.9.16) to base (3.9.16) for: /home/$USER_NAME
2025-04-16 23:23:11.007 [info] Python API: Changed environment from undefined to base (3.9.16) for: global
2025-04-16 23:23:11.007 [info] Internal: Changed environment from undefined to base (3.9.16) for: global
2025-04-16 23:23:11.069 [info] Resolved Python Environment /opt/$SOME_PATH/bin/python
2025-04-16 23:23:11.070 [info] Using conda from cache: /opt/$SOME_PATH/bin/conda
2025-04-16 23:23:11.070 [info] Found base environment: /opt/$SOME_PATH
2025-04-16 23:23:11.118 [info] Resolved Python Environment /opt/$SOME_PATH/bin/python
2025-04-16 23:23:11.118 [info] Using conda from cache: /opt/$SOME_PATH/bin/conda
2025-04-16 23:23:11.118 [info] Found base environment: /opt/$SOME_PATH
2025-04-16 23:23:11.120 [info] Resolved Python Environment /opt/$SOME_PATH/bin/python
2025-04-16 23:23:11.120 [info] Using conda from cache: /opt/$SOME_PATH/bin/conda
2025-04-16 23:23:11.120 [info] Found base environment: /opt/$SOME_PATH
2025-04-16 23:23:11.121 [info] Resolved Python Environment /opt/$SOME_PATH/bin/python
2025-04-16 23:23:11.121 [info] Using conda from cache: /opt/$SOME_PATH/bin/conda
2025-04-16 23:23:11.121 [info] Found base environment: /opt/$SOME_PATH
2025-04-16 23:23:22.542 [info] Resolved Python Environment /opt/$SOME_PATH/bin/python
2025-04-16 23:23:22.542 [info] Using conda from cache: /opt/$SOME_PATH/bin/conda
2025-04-16 23:23:22.542 [info] Found base environment: /opt/$SOME_PATH
2025-04-16 23:23:22.545 [info] Resolved Python Environment /opt/$SOME_PATH/bin/python
2025-04-16 23:23:22.545 [info] Using conda from cache: /opt/$SOME_PATH/bin/conda
2025-04-16 23:23:22.545 [info] Found base environment: /opt/$SOME_PATH
2025-04-16 23:23:22.547 [info] Resolved Python Environment /opt/$SOME_PATH/bin/python
2025-04-16 23:23:22.547 [info] Using conda from cache: /opt/$SOME_PATH/bin/conda
2025-04-16 23:23:22.547 [info] Found base environment: /opt/$SOME_PATH
2025-04-16 23:23:22.559 [info] Resolved Python Environment /opt/$SOME_PATH/bin/python
2025-04-16 23:23:22.559 [info] Using conda from cache: /opt/$SOME_PATH/bin/conda
2025-04-16 23:23:22.559 [info] Found base environment: /opt/$SOME_PATH
2025-04-16 23:23:35.981 [error] Error installing packages Failed to run "conda install --prefix /opt/$SOME_PATH --yes python":

==> WARNING: A newer version of conda exists. <==
current version: 23.1.0
latest version: 25.3.1

Please update conda by running

$ conda update -n base -c https://conda.anaconda.org/conda-forge/linux-64 conda

Or to minimize the number of packages updated during conda update use

 conda install conda=25.3.1

EnvironmentNotWritableError: The current user does not have write permissions to the target environment.
environment location: /opt/$SOME_PATH
uid: 1019
gid: 1019

2025-04-16 23:23:35.992 [info] Resolved Python Environment /opt/$SOME_PATH/bin/python
2025-04-16 23:23:35.992 [info] Using conda from cache: /opt/$SOME_PATH/bin/conda
2025-04-16 23:23:35.992 [info] Found base environment: /opt/$SOME_PATH
2025-04-16 23:23:35.993 [info] Resolved Python Environment /opt/$SOME_PATH/bin/python
2025-04-16 23:23:35.993 [info] Using conda from cache: /opt/$SOME_PATH/bin/conda
2025-04-16 23:23:35.993 [info] Found base environment: /opt/$SOME_PATH
2025-04-16 23:23:35.994 [info] Resolved Python Environment /opt/$SOME_PATH/bin/python
2025-04-16 23:23:35.994 [info] Using conda from cache: /opt/$SOME_PATH/bin/conda
2025-04-16 23:23:35.994 [info] Found base environment: /opt/$SOME_PATH
2025-04-16 23:23:35.995 [info] Resolved Python Environment /opt/$SOME_PATH/bin/python
2025-04-16 23:23:35.995 [info] Using conda from cache: /opt/$SOME_PATH/bin/conda
2025-04-16 23:23:35.995 [info] Found base environment: /opt/$SOME_PATH
2025-04-16 23:23:38.193 [info] Resolved Python Environment /opt/$SOME_PATH/bin/python
2025-04-16 23:23:38.193 [info] Using conda from cache: /opt/$SOME_PATH/bin/conda
2025-04-16 23:23:38.193 [info] Found base environment: /opt/$SOME_PATH
2025-04-16 23:23:38.193 [info] Using conda from cache: /opt/$SOME_PATH/bin/conda
2025-04-16 23:23:38.441 [info] Using conda from cache: /opt/$SOME_PATH/bin/conda
2025-04-16 23:23:43.835 [info] Resolved Python Environment /opt/$SOME_PATH/bin/python
2025-04-16 23:23:43.835 [info] Using conda from cache: /opt/$SOME_PATH/bin/conda
2025-04-16 23:23:43.835 [info] Found base environment: /opt/$SOME_PATH
2025-04-16 23:23:43.836 [info] Resolved Python Environment /opt/$SOME_PATH/bin/python
2025-04-16 23:23:43.837 [info] Using conda from cache: /opt/$SOME_PATH/bin/conda
2025-04-16 23:23:43.837 [info] Found base environment: /opt/$SOME_PATH


i replaced the sensitive infos

@Whatever314 Can you share the logs from Output > Python Environments

@Whatever314
Copy link
Author

"python-envs.defaultEnvManager": "ms-python.python:conda",
"python-envs.defaultPackageManager": "ms-python.python:conda"

above is the settings.

@karthiknadig
Copy link
Member

@Whatever314 Does your environment have Python installed? this happens when we detect that the environment you have selected does not have python.

@Whatever314
Copy link
Author

No🙃, maybe that is the problem. But could your extension provide a pop-up, some setting entrys, etc. so that we users could decide whether we allow the extension to DOWNLOAD things on our machine, before the downloading happens?👀

@Whatever314 Does your environment have Python installed? this happens when we detect that the environment you have selected does not have python.

@karthiknadig
Copy link
Member

Yes, we are actually adding controls for this.

Tracking issue #136
Work in progress PR: #218

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

No branches or pull requests

2 participants