安装2.x 和 3.x 的python

我这里使用anaconda来安装两个版本的python包。

conda create --name python2 python=2.7
conda create --name python23 python=2.7

安装完之后,在你的anaconda程序目录下会发现:

设置系统环境变量

pip的使用

安装的时候,最好加上清华源,不然可以因为网络问题报错。

python2 -m pip install termcolor -i https://pypi.tuna.tsinghua.edu.cn/simple
python3 -m pip install termcolor -i https://pypi.tuna.tsinghua.edu.cn/simple python2 -m pip list
python3 -m pip list

参考

https://blog.csdn.net/fxjzzyo/article/details/77070868

Win命令行切换Python版本的更多相关文章

  1. macOS命令行切换Python版本

    目录 brew安装anaconda3 anaconda3环境变量设置 安装双版本 命令后切换python环境 pip ide vscode set 参考 brew安装anaconda3 brew ca ...

  2. Linux系统之路——python多版本共存问题(ps:自行切换python版本,pip安装遇到的一些问题)

    经常遇到这样的情况: 系统自带的Python是2.6,自己需要Python 2.7中的某些特性: 系统自带的Python是2.x,自己需要Python 3.x: 此时需要在系统中安装多个Python, ...

  3. Linux(ubuntu18.04)切换python版本

    前言 Ubuntu18.04系统在安装python时会安装两个版本:2.7和3.6.默认情况下系统环境使用的是python2,但是我们有时需要使用python3来作为我们的开发环境,所以需要自由切换p ...

  4. Windows 命令行切换目录

    Windows 命令行切换目录 特别注意:切换到其它盘符不需要 cd 命令 1. 切换到 C 盘根目录 打开终端 cmd 后,输入cd C:\(一定要加上后面的反斜扛) 2.切换到 C 盘子目录 打开 ...

  5. 设置PATH 环境变量、pyw格式、命令行运行python程序与多重剪贴板

    pyw格式简介: 与py类似,我认为他们俩卫衣的不同就是前者运行时候不显示终端窗口,后者显示 命令行运行python程序: 在我学习python的过程中我通常使用IDLE来运行程序,这一步骤太过繁琐( ...

  6. Window命令行切换命令

    Windows 命令行切换目录 特别注意:切换到其它盘符不需要 cd 命令 1. 切换到 C 盘根目录 打开终端 cmd 后,输入cd C:\(一定要加上后面的反斜扛) 2.切换到 C 盘子目录 打开 ...

  7. 在命令行输入python出现“Warning:This Python interpreter is in a conda environment, but the environment has not been activated. Libraries may fail to load. To activate this environment please see https://conda.

    [现象] 在命令行输入python出现“Warning:This Python interpreter is in a conda environment, but the environment h ...

  8. 在Linux命令行执行python命令

    在Linux的命令行执行python的某些命令: [root@centos7 ~]# echo "import sys ;print(sys.path)"|python3.6 [' ...

  9. win命令行环境编码设置为utf-8

    win命令行环境编码默认为gbk,有时运行文件编码为utf-8,会导致编码错误,可以修改注册表进行设置环境编码. win+r =>regedit 找到 计算机\HKEY_CURRENT_USER ...

随机推荐

  1. Educational Codeforces Round 89 (Rated for Div. 2) C. Palindromic Paths(贪心)

    题目链接:https://codeforces.com/contest/1366/problem/C 题意 有一个 $n \times m$ 的 $01$迷宫,要使从 $(1,1)$ 到 $(n,m) ...

  2. Traveling Salesman among Aerial Cities 旅行商(TSP)问题

    题目链接:点我 问题: 给你n个点的坐标(x,y,z).从点(a,b,c) 到另一个点 (p,q,r) 的距离是:|p−a|+|q−b|+max(0,r−c) 问你从一个点为起点,找一条能经过其他所有 ...

  3. P1268 树的重量(板子)

    题目: 题目描述 树可以用来表示物种之间的进化关系.一棵"进化树"是一个带边权的树,其叶节点表示一个物种,两个叶节点之间的距离表示两个物种的差异.现在,一个重要的问题是,根据物种之 ...

  4. VS中使用TreeView的Checked属性问题

    VS中使用TreeView,当需要用到Checked属性,并需要同步子节点和父节点的Checked属性时,若使用AfterCheck事件会导致死循环,这里我使用的是NodeMouseClick事件.代 ...

  5. Gym 101480F Frightful Formula(待定系数)题解

    #include<cmath> #include<set> #include<map> #include<queue> #include<cstd ...

  6. OKR vs KPI

    OKR vs KPI refs xgqfrms 2012-2020 www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!

  7. git config [section] solutions

    git config [section] solutions fix git [section] warnings global config $ vim ~/.gitconfig [user] em ...

  8. Vue 3 In Action

    Vue 3 In Action $ yarn add vue https://v3.vuejs.org demos refs https://v3.vuejs.org/guide/migration/ ...

  9. js 裁剪图片

    js 裁剪图片 https://gugeji.com/search?q=js剪切图片

  10. Service Worker in Action

    Service Worker in Action https://caniuse.com/#feat=serviceworkers Service Workers 1 W3C Candidate Re ...