Skip to content

Refresh packages after installation from a terminal #57

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
eleanorjboyd opened this issue Dec 3, 2024 · 7 comments · Fixed by #316
Closed

Refresh packages after installation from a terminal #57

eleanorjboyd opened this issue Dec 3, 2024 · 7 comments · Fixed by #316
Assignees
Labels
feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@eleanorjboyd
Copy link
Member

Testing #24503

  1. activated my venv called .nvenv by hand in terminal
  2. install pytest
  3. click reload button under .nvenv in the sidebar
  4. 🐛 only shows 2 first pkgs
  5. in the logs, shows it found all the other ones

2024-12-03 11:16:38.730 [info] Running: uv pip list --python /Users/eleanorboyd/testingFiles/python-ext-tester/.nvenv/bin/python
2024-12-03 11:16:38.744 [info] Package            Version
------------------ -------
exceptiongroup     1.2.2
importlib-metadata 6.7.0
iniconfig          2.0.0
packaging          24.0
pip                20.1.1
pluggy             1.2.0
pytest             7.4.4
setuptools         47.1.0
tomli              2.0.1
typing-extensions  4.7.1
zipp               3.15.0


here you can also see pip list gets a different answer
Image

@karthiknadig karthiknadig transferred this issue from microsoft/vscode-python Dec 4, 2024
@karthiknadig
Copy link
Member

You have to refresh packages specifically. Terminal installs are not currently detected, but we could enable this in the future. Reloading environment does not automatically refresh packages as it can be an expensive operation, if there are lot of environments it can take significantly more time.

Pressing this should get you the latest packages:
Image

@karthiknadig karthiknadig changed the title incorrect listed packages Refresh packages after installation from a terminal Dec 5, 2024
@karthiknadig karthiknadig removed their assignment Dec 5, 2024
@karthiknadig karthiknadig added the feature-request Request for new features or functionality label Dec 16, 2024
@karthiknadig karthiknadig self-assigned this Apr 18, 2025
@karthiknadig karthiknadig added this to the April 2025 milestone Apr 18, 2025
@karthiknadig karthiknadig added the verification-needed Verification of issue is requested label Apr 28, 2025
@karthiknadig
Copy link
Member

Verification steps:

  1. Open a project with a venv set
  2. Find and expand the packages node for the venv from environments views
  3. Install any package from the terminal using python -m pip install attrs
  4. Packages view should update after installation completes.

@meganrogge meganrogge added the verified Verification succeeded label Apr 28, 2025
@meganrogge
Copy link

meganrogge commented Apr 28, 2025

@karthiknadig is this the packages view? If not, how do I focus it? if so, is it expected that attrs is unchecked here?

Image

@meganrogge meganrogge removed the verified Verification succeeded label Apr 28, 2025
@karthiknadig
Copy link
Member

This is the view:

Image

But, I suspect that python was not activated in your case. The view you are seeing also should have attrs ticked.

A good way to test is python -c "import sys;print(sys.executable)" this should print python from your venv

@meganrogge
Copy link

It's activated for me in that env

Image

@meganrogge
Copy link

Not seeing it here either

Image

@karthiknadig
Copy link
Member

karthiknadig commented Apr 28, 2025

That is not the right env.
for you case it should have been <workspace>/.venv/bin/python

@meganrogge meganrogge added the verified Verification succeeded label Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants