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

How to install the package with the specified version when there are multiple versions of Python on the computer

編輯:Python

It's in the computer python2.7、python3.7、python3.10 Waiting for multiple versions , Some of them come with the software , As a result, the installed package is often not in the version you want , Here are two ways . Welcome to add !

The first one is :
open pycharm, open setting, Click on Project:*****, Click the inverted triangle arrow to select python edition , You can order if you don't have one Show All Or point the pinion to add a path .
Then click the small plus sign in the figure , Enter the package name in the search box , Select the corresponding package for installation .

The second kind
Use py -version -m pip install packages, -version Version number ,packages For the package name , Such as to python3.5 install numpy

py -3.5 -m pip install numpy

The third kind of
cmd Open the command line ,cd Get into python Under installation path , Use python -m pip install packages,packages For the package name , Such as to python2.7 install python-docx

C:\Users\Administrator>cd c:\
c:\>cd python27
c:\Python27>python -m pip install python-docx

Error notification

Click to download Microsoft Visual C Compiler for Python 2.7

https://mail.python.org/pipermail/python-announce-list/2014-September/010457.html


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