惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Exploit Database - CXSecurity.com
A
Arctic Wolf
K
Kaspersky official blog
T
Threat Research - Cisco Blogs
PCI Perspectives
PCI Perspectives
www.infosecurity-magazine.com
www.infosecurity-magazine.com
P
Privacy International News Feed
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
U
Unit 42
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
P
Privacy & Cybersecurity Law Blog
O
OpenAI News
量子位
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
C
Cisco Blogs
AWS News Blog
AWS News Blog
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
美团技术团队
T
Threatpost
S
Schneier on Security
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
Cyber Attacks, Cyber Crime and Cyber Security
Last Week in AI
Last Week in AI
C
CERT Recently Published Vulnerability Notes
Blog — PlanetScale
Blog — PlanetScale
C
Cybersecurity and Infrastructure Security Agency CISA
F
Full Disclosure
博客园_首页
N
Netflix TechBlog - Medium
Security Latest
Security Latest
有赞技术团队
有赞技术团队
Google DeepMind News
Google DeepMind News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
The Register - Security
The Register - Security
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Recent Announcements
Recent Announcements
博客园 - Franky
P
Palo Alto Networks Blog
Project Zero
Project Zero
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
H
Help Net Security
Hacker News: Ask HN
Hacker News: Ask HN
Cisco Talos Blog
Cisco Talos Blog
H
Heimdal Security Blog
The Hacker News
The Hacker News
博客园 - 【当耐特】
GbyAI
GbyAI

博客园 - 疯吻IT

timestamp for this request was 1000ms ahead of the server's time GitHub无法访问、443 Operation timed out的解决办法 - 疯吻IT Ccxt: ModuleNotFoundError:没有名为“ ccxt”的模块 机器翻译数据集 CENTOS手动安装修复python ,YUM CENTOS手动安装修复YUM Python3 找不到库 UnicodeDecodeError: 'ascii' codec can't decode byte 0xa0 in position 0: ordinal not in range(128) 数据集 rnn_model.fit Incompatible shapes Mysql 密码过期 帝国cms打开慢 如何快速获得权重站 HTTP 404 Not Found Error with .woff or .woff2 Font Files php报错 syntax error, unexpected T_VARIABLE 修改帝国cms栏目后,如何更新 用python 发 帝国cms 文章 帝国cms更新报错解决办法 帝国cms 不能正常显示最新文章 帝国CMS Table '***.phome_ecms_news_data_' doesn't exist python 去重
多版本python及多版本pip使用
疯吻IT · 2018-09-26 · via 博客园 - 疯吻IT

最近做一些网站的发布程序,要用到python3,所以又安装了python3。

www.qlrx.net
www.393662.com
www.qnpx.net
www.393225.com

1. 多版本python

Windows 上的 Python 自带启动器 py.exe,默认安装到系统盘的 system32 文件夹里。如果你同时安装了 Python 2 和 Python 3,用的时候直接在终端里输入:

就是打开 Python 3 的 REPL,或者

就可以运行 Python 3 的脚本了。
同理,直接输入

使用 Python 2 来运行脚本。

2. 多版本pip

当Python2和Python3同时存在于windows上时,它们对应的pip都叫pip.exe,所以不能够直接使用 pip install 命令来安装软件包。而是要使用启动器py.exe来指定pip的版本。命令如下:


py -2 -m pip install XXXX

-2 还是表示使用 Python2,-m pip 表示运行 pip 模块,也就是运行pip命令了。如果是为Python3安装软件,那么命令类似的变成


py -3 -m pip install XXXX