无法在 mac osx 10.10.2 中升级 python 6 包 [英] Unable to upgrade python six package in mac osx 10.10.2

查看:22
本文介绍了无法在 mac osx 10.10.2 中升级 python 6 包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装最新版本的 6 个 python 包,但我有以下问题.在 mac OSX 10.10.2 中无法摆脱六个 1.4.1

I am trying to install latest version of six python package but I have following issues. Can't get rid of six 1.4.1 in mac OSX 10.10.2

sudo pip install six --upgrade
Requirement already up-to-date: six in /Library/Python/2.7/site-packages
Cleaning up...

pip search six
six - Python 2 and 3 compatibility utilities
INSTALLED: 1.9.0 (latest)

python -c "import six; print six.version"
1.4.1

which -a python
/usr/bin/python
which -a pip
/usr/local/bin/pip

这里有什么问题?不能升级六个!

What is wrong here? Can't upgrade six!

推荐答案

Mac OS X 的默认 python 作为框架安装.在framework目录下,有一个'Extras'目录,six包已经放在那里了.

Mac OS X's default python is installed as a framework. Under the framework directory, there is an 'Extras' directory and six package is already placed there.

/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six.py

根据描述(https://github.com/MacPython/wiki/wiki/Which-Python),/System/Library/Frameworks/Python.framework/Versions/2.7/Extras 列在 /Library/Python/2.7/site-packages<之前/code> 在模块搜索路径中.这意味着 /System/Library/Frameworks/Python.framework/Versions/2.7/Extras 中已经存在的所有包都无法升级.

According to the description (https://github.com/MacPython/wiki/wiki/Which-Python), /System/Library/Frameworks/Python.framework/Versions/2.7/Extras is listed before /Library/Python/2.7/site-packages in module search path. This means all packages already exists in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras can't upgrade.

也许你应该手动安装python而不是使用默认的python.

Maybe you should install python manually and not to use default python.

这篇关于无法在 mac osx 10.10.2 中升级 python 6 包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆