用homebrew 升级安装python3.7 之后系统的python版本还是旧的怎么办
mac 中安装了多个版本的python$ brew install python3
Updating Homebrew...
Warning: python 3.7. is already installed, it's just not linked
You can use `brew link python` to link this version.
#brew 提示已经安装了 3.7.
但是系统变量里检测不到 并提示用 `brew link python` 来链接
$ brew link python
Linking /usr/local/Cellar/python/3.7....
Error: Could not symlink bin/2to3
Target /usr/local/bin/2to3
already exists. You may want to remove it:
rm '/usr/local/bin/2to3' To force the link and overwrite all conflicting files:
brew link --overwrite python To list all files that would be deleted:
brew link --overwrite --dry-run python #链接错误 提示有 /usr/local/bin/2to3 需要删除然后重写
$ brew link --overwrite python
Linking /usr/local/Cellar/python/3.7.... symlinks created
#成功之后 查看版本。。
$ python3 --version
Python 3.6. $python --version
Python 3.6. :: Anaconda, Inc. 两种的命令显示的版本不一样。由于之前安装了anaconda,anaconda 之前用的版本python指定了3.6.4,和anaconda绑定的。
现在用brew安装了之后并没有链接到系统变量。
之后又用安装包的格式下载了 python 3.7.
然后
$ python3 --version
Python 3.7.
可见通过官方安装包安装的会自动注册环境变量 经过验证凡是通过安装包安装的都会在下面的目录下:
/Library/Frameworks/Python.framework/Versions/3.4
/Library/Frameworks/Python.framework/Versions/3.6
/Library/Frameworks/Python.framework/Versions/3.7 通过brew 安装的都会在
/usr/local/Cellar/python/3.7.
并且在子目录中
/usr/local/Cellar/python/3.7./Python\ Launcher\ .app
idle 和 Python Launcher
综上,尽量用官方网站提供的安装包,不用做额外的操作,制动链接系统变量
用homebrew 升级安装python3.7 之后系统的python版本还是旧的怎么办的更多相关文章
- 完美原创:centos7.1 从源码升级安装Python3.5.2
(原创)完美原创:centos7.1 从源码升级安装Python3.5.2 下载Python3.5.2源码:https://www.python.org/downloads/release/pytho ...
- centos7.1 从源码升级安装Python3.5.2
http://blog.csdn.net/tengyunjiawu_com/article/details/53535153 centos7.1 从源码升级安装Python3.5.2(我写的,请大家度 ...
- 更新centos系统的python版本
因今天安装一程序需要用到python高版本,所以升级来系统自带的python. 先查询下系统的python版本是多少. #python -V 显示出来的是2.4.3,太老了,现在升级到比较稳定的版本3 ...
- Mac上刚安装的WebStorm或PHPStorm遇到SVN版本太旧的问题
Mac上刚安装的WebStorm或PHPStorm遇到SVN版本太旧的问题: URL: svn: E155021: This client is too old to work with the wo ...
- Linux下升级安装Python-3.6.2版本
本文主要介绍在Linux(CentOS)下将Python的版本升级为3.6.2的方法 众所周知,在2020年python官方将不再支持2.7版本的python,所以使用3.x版本的python是必要的 ...
- 通过安装HomeBrew来安装Python3
首先说什么是HomeBrew? 下面引用简书上一个博客的解释:(博客链接:http://www.jianshu.com/p/d229ac7fe77d) 为什么要使用Homebrew Mac OS X是 ...
- Linux下升级安装Python-3.6.9版本
1.操作系统信息 (1)cat /etc/redhat-releas (2)Red Hat Enterprise Linux Server release 6.0 (Santiago) 2.安装开发 ...
- 谨慎安装Python3.7.0,SSL低版本导致Pip无法使用
最新新配置了一台服务器.安装 的时候直接使用了最新的Python 3.7最新版本. 安装成功,编译成功.但是用pip 安装包的时候提示:pip is configured with locations ...
- CentOS7.5安装python3并设置成系统默认python环境
1.环境说明 系统版本:CentOS7. 安装的python版本: 2.编译环境准备(如果出现文件解压错误,wget命令无法下载等各种小意外,先把下面的环境安装一遍) yum install zlib ...
随机推荐
- Atitit 数据库视图与表的wrap与层级查询规范
Atitit 数据库视图与表的wrap与层级查询规范 1.1. Join层..连接各个表,以及显示各个底层字段1 1.2. 统计层1 1.3. 格式化层1 1.1. Join层..连接各个表,以及显示 ...
- flink source code
https://github.com/apache/flink/tree/master/docs https://github.com/flink-china/1.6.0 https://github ...
- pandas DataFrame.shift()函数
pandas DataFrame.shift()函数可以把数据移动指定的位数 period参数指定移动的步幅,可以为正为负.axis指定移动的轴,1为行,0为列. eg: 有这样一个DataFrame ...
- sublime text 3 安装ES6插件
- 使用tar解压文件提示gzip: stdin: not in gzip format错误
使用tar解压文件提示gzip: stdin: not in gzip format错误 1. 问题描述 使用docker save xxxx > xxx.tar导出镜像,由于文件太大,需要sp ...
- VIM空格和TAB转换
在.vimrc中添加以下代码后,重启vim即可实现按TAB产生4个空格:set ts=4 (注:ts是tabstop的缩写,设TAB宽4个空格)set expandtab 对于已保存的文件,可以使用下 ...
- Centos 6.4 安装dnsmasq
1 下载源码 wget http://www.thekelleys.org.uk/dnsmasq/dnsmasq-2.45.tar.gz cp dnsmasq-2.45.tar.gz /usr/src ...
- 总结一下搭建简单Web服务器的一些方法
使用nodejs+anywhere模块搭建静态文件服务器 anywhere随时随地将你的当前目录变成一个静态文件服务器的根目录. 安装npm install anywhere -g,然后进入任意目录在 ...
- [Android Studio] Using API of OpenCV DNN
前言 一.故事背景 NDK方法人脸识别 OpenCV4Android系列: 1. OpenCV4Android开发实录(1):移植OpenCV3.3.0库到Android Studio 2.OpenC ...
- vue中引入jquery
npm install jquery -S 在webpack.base.conf.js里加入 plugins: [ new webpack.optimize.CommonsChunkPlugin('c ...