简体   繁体   中英

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

在此处输入图像描述

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!

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:

在此处输入图像描述

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"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM