程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

How to install Python libraries in vscade

編輯:Python

How to be in vscode Install in python library

1. Already in vscode It's in Chinese python And configured python Running environment .

Check whether the running environment is configured correctly , Press Windows+R Key combination: enter... In the operation window cmd, Open a command prompt window and enter python Sure you can.

2. find vscode in python The path of

Run any code , for example print(“hehe”) The following terminal displays

Circled in red in the picture is python The path of , To python3.8 until .

If what you show is different from me , Can be found in setting.json Find and copy the path in ( stay vscode I've configured python The environment should be found )

3. The official start of the

stay vscode Open the terminal , Click on View, Click... In the selection bar that appears Terminal( Integrated terminal ) You can open

After opening the terminal , We enter... In the terminal python Install under directory Scripts Folder : Input cd+ Format + The path just copied +\Scripts\

After confirmation, if the folder appears directly on the terminal Scripts The path of , Input ".\pip install Need to install library name " Make sure to wait for the installation to succeed ( If it fails, you can install it several more times , Maybe it will work ).

I installed numpy For example :

Of course, if you are typing “cd+ Format + The path just copied +\Scripts\” after , Did not jump out Scripts The path of , But just like me vscode The path of ( As shown in the figure below )

Click the link to open the address directly , You can choose to create a new window , You can also not create a new , At this time, the terminal will have Scripts The path of , Enter after .\pip install numpy that will do .


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved