[转]mac下Python升级到指定的版本
以2.7升级到3.3为例
1.删除原版本
a)删除系统库中的版本
sudo rm -R /System/Library/Frameworks/Python.framework/Versions/2.7
b)删除Current版本
sudo rm /System/Library/Frameworks/Python.framework/Versions/Current
c)删除/usr/bin目录下的python相关文件
find . -name "py*" -print| xargs rm -rf
2.下载并安装指定的python版本
到python官网下载要安装的版本,并且安装
3.链接系统库中的Python版本
a)链接库文件,先将新安装的版本移动到系统版本目录下
sudo mv /Library/Frameworks/Python.framework/Versions/3.3 /System/Library/Frameworks/Python.framework/Versions
b)重新链接Current版本
sudo ln -s /System/Library/Frameworks/Python.framework/Versions/3.3 /System/Library/Frameworks/Python.framework/Versions/Current
c)重新链接/usr/bin/下的Python相关的文件
sudo ln -s /System/Library/Frameworks/Python.framework/Versions/3.3/bin/pydoc3.3 /usr/bin/pydoc
sudo ln -s /System/Library/Frameworks/Python.framework/Versions/3.3/bin/python3.3 /usr/bin/python
sudo ln -s /System/Library/Frameworks/Python.framework/Versions/3.3/bin/pythonw3.3 /usr/bin/pythonw
sudo ln -s /System/Library/Frameworks/Python.framework/Versions/3.3/bin/python3.3m-config /usr/bin/python-config
4.重置环境变量(.bash_profile)
PYTHON=$/System/Library/Frameworks/Python.framework/Versions/2.7/bin:$PATH
PLUS:有提到要修改group权限
sudo chown -R root:wheel /System/Library/Frameworks/Python.framework/Versions/3.3
reference:
http://blog.163.com/zhou_li12/blog/static/18498031120140190282974/
[转]mac下Python升级到指定的版本的更多相关文章
- mac下python环境pip报错[SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) 的解决方法
1.mac下python环境pip报错: issuserdeMacBook-Pro:~ issuser$ pip install pyinstallerCollecting pyinstaller ...
- Mac下python初学之Image库(PIL)
Mac下python 使用Image库 安装PIL,下载http://www.pythonware.com/products/pil/ 解压PIL源码包,阅读README知道需要使用python se ...
- mac 下获取 os x 的系统版本,使用 oc cocoa
mac 下获取 os x 的系统版本,使用 oc cocoa 1: #import <CoreServices/CoreServices.h> SInt32 major, minor, b ...
- Mac下Python和Pycharm之virtualenv
一.python如何配置virtualenv 1.安装virtualenv pip3 install virtualenvpip install -i https://pypi.tuna.tsin ...
- mac下python实现vmstat
mac下没有linux/unix 的vmstat,只有vm_stat; sh-3.2# vm_statMach Virtual Memory Statistics: (page size of 409 ...
- Mac 下 python 环境问题
一.Mac下,可能存在的 python 环境: 1.Mac系统自带的python环境在(由于不同的 mac 系统,默认自带的 python 版本可能不一样): Python 2.7.10: /Syst ...
- mac 下 python 虚拟环境的安装和配置
前言:继续安装中,这节记录 mac 安装 python 虚拟环境,多版本共存... 1. 安装 pip -- python的包管理工具: sudo easy_install pip 安装成功,出现下面 ...
- MAC下《暗黑世界》客户端版本编译说明!!
原地址:http://blog.csdn.net/uxqclm/article/details/11970659 2013-09-24 12:02 161人阅读 评论(0) 收藏 举报 目录(?) ...
- mac 下node,yarn安装及版本切换
node安装 https://nodejs.org/en/download/ 到官网下载指定版本 安装node的管理工具 sudo npm install -g n //安装n sudo n 8.9. ...
随机推荐
- 如何在异步请求时设置RequestHeader
一.为何要用到setRequestHeader 通常在HTTP协议里,客户端像服务器取得某个网页的时候,必须发送一个HTTP协议的头文件,告诉服务器客户端要下载什么信息以及相关的参数.而 XMLHTT ...
- 实例解析shell子进程(subshell )
http://blog.csdn.net/sosodream/article/details/5683515 http://blog.csdn.net/firefoxbug/article/detai ...
- Solr简单部署
因为公司最近涉及这个项目,想了解一下,以便提供更好的支持.. 参考URL: http://www.centoscn.com/CentosServer/test/2014/1127/4193.html ...
- LeetCode_Permutations
Given a collection of numbers, return all possible permutations. For example, [1,2,3] have the follo ...
- git:fatal the current branch master has no upstream branch
git push的时候发生上述错误. git push -u "resp" master resp为git仓库的“地址” reference中由解决方案 http://blog.c ...
- heritrix 3.2.0 -- 环境搭建
heritrix作为一个比较经典的开源爬虫,写这篇文章目的是因为,3.X之后的heritrix的介绍以及配置的文章比较少了. heritrix 3.x 以后使用maven 2配置jar包引用,但是总是 ...
- ios 导航栏和旋屏
1,状态栏(UIStatusBar) http://my.oschina.net/shede333/blog/304560 2,visibleViewController和topViewControl ...
- Linux SD/MMC/SDIO驱动分析
一.SD/MMC/SDIO概念区分 SD(SecureDigital)与 MMC(MultimediaCard) SD 是一种 flash memory card 的标准,也就是一般常见的 SD 记忆 ...
- python urllib基础学习
# -*- coding: utf-8 -*- # python:2.x __author__ = 'Administrator' #使用python创建一个简单的WEB客户端 import urll ...
- QT文件夹定位(网友提供)
#ifndef FOLDERFINDER_H #define FOLDERFINDER_H#include <QDir>class FolderFinder{public: QStr ...