i wonder How to reload python package after pip install in Visual Studio Code?
- pip install 'package-A'
- pip list
- Not exist 'package-A'
- Restart 'Visual Studio Code'
Is the only way restart?
Thank u.
i wonder How to reload python package after pip install in Visual Studio Code?
Is the only way restart?
Thank u.
The best answer I've found is to use Developer:Reload Window like rioV8 suggested. You can either use the command palette or you can change the key mappings as described here. There's already a Ctrl + R key mapping for reloading the window, but its got a 'when' condition attached to it so I changed that to true. I also had to delete key mappings for other extensions so there was no overlap.
You can do that using the Refresh Explorer (The reload button) right next to the directory/workspace that you opened up in the File Explorer.
You might have to hover for a while next to the workspace/directory name on the file explorer once it's expanded to have it in view.
You mean upgrade or re-install ?
pip install --upgrade --force-reinstall <package>
OR
pip install -I <package>
pip install --ignore-installed <package>
Try these commands
On MacOS, use command + shift + p and then choose "Developer: Reload Window". It is helpful to bind this to command + r. For Windows users, replace command with CTRL.
Are you sure this is a vscode issue? What happens when you run pip install from a normal command prompt? I suspect you will have the same issue, if that proves true, I would entirely uninstall python and re-install python, then install/upgrade pip to latest.
python -m pip install –upgrade pip