Home > Blockchain >  Vscode : How I can add module for other python interpreter?
Vscode : How I can add module for other python interpreter?

Time:06-13

enter image description here

Hi! I tried to use python 3.8 in vscode. But when I changed the version of interpreter, my modules made error. So after changed the interpreter from 3.10.5 to 3.8.9,I input pip3 install 000. But, That is not working.

How I can handle this?

  1. How I can change the main version of python in VScode
  2. How I can add library for my sub python interpreter?

Thank you!

CodePudding user response:

For the first question, you can use "ctrl shift P" to choose your python interpreter. And for jupyter file, you can change the kernel by clicking the button in your picture:

enter image description here

For the second question,usually, when you select an interpreter, pip will automatically install the package into the library under the selected interpreter. You can use the following command:

pip install packageName --target="sub python path"
  • Related