问题描述
我刚买了一台新机器(osx-lion),并且正在尝试重新安装所有工具.我正在尝试安装NumPy和SciPy.我知道Apple发行的版本并不完全使NumPy和SciPy满意,所以我去了Python.org并安装了推荐的版本(2.7.3),该版本运行得很顺利.现在,当我which python
时,它指向的是新的2.7版本,该版本与计算机随附的版本不同.我的PATH
变量还包含2.7(python.org)版本的路径.
然后我下载了NumPy并收到消息:
numpy 1.6.1 cannot be installed on this disk. numpy requires python.org Python 2.6 to install.
因此,我尝试了SciPy,并得到了相同的消息:
scipy 0.10.1 can't be installed on this disk. scipy requires python.org Python 2.6 to install.
经过一番谷歌搜索后,我发现所需的2.6仅仅是2.6或或更高版本,并且确实安装了Python.org版本(2.7),但我必须缺少一些东西. >
编辑-如果某些更改需要重新启动才能生效,请尝试重新启动计算机,但这无济于事.
任何帮助将不胜感激.谢谢大家.
一种安装numpy和scipy且不经历版本冲突的简单方法是使用 python发行版.他们有一个免费版本,其中包括python和所需的两个软件包,以及我非常喜欢的iPython控制台.他们还提供了更广泛的发行版本,仅供学术使用免费,否则,您需要付费.
python.org建议安装python 2.x的更新版本,而不是OSX随附的版本.遵循此建议,我无需进行任何思考就可以使自己工作起来更加麻木和麻木.这是我正在使用的版本(某些版本号丢失,我的注释不完整):
- 来自python.org的Python 2.7.2(64位)
- numpy/scipy(OSX 10.6构建)
- ipython 0.12
- readline
- matplotlib
最终,enthought.com是安装所有内容的最简单方法.
I just got a new machine (osx-lion), and I'm in the process of trying to reinstall all of my tools. I'm trying to install NumPy and SciPy. I know that the version Apple ships isn't exactly what makes NumPy and SciPy happy, so I went to Python.org and installed the recommended version (2.7.3), which went smoothly. Now when I which python
, it points to the new 2.7 version which was different than the one the machine came with. My PATH
variable also contains the path to the 2.7 (python.org) version.
Then I downloaded NumPy and got the message:
numpy 1.6.1 cannot be installed on this disk. numpy requires python.org Python 2.6 to install.
So then I tried SciPy, and got the same message:
scipy 0.10.1 can't be installed on this disk. scipy requires python.org Python 2.6 to install.
After some googling, I see that the 2.6 required is just 2.6 or or greater, and I did install the Python.org version (2.7), but I must be missing something.
Edit - Just tried rebooting the machine in case there were some changes that needed a restart to take effect, but that didn't help.
Any help would be greatly appreciated. Thanks all.
A simple and easy way to install numpy and scipy without going through version conflicts is to use the Enthought python distribution. They have a free version that includes python and the two packages you want, and the iPython console that I like a lot. They also offer a more extensive distribution that is free only for academic use, otherwise you have to pay for it.
python.org recommends installing an updated version of python 2.x instead of the version that comes with OSX. Following this advice, I was able to get scipy and numpy to work without enthought. Here are the versions that I am using (some version numbers missing, my notes are not complete):
- Python 2.7.2 from python.org (64 bit)
- numpy/scipy (OSX 10.6 build)
- ipython 0.12
- readline
- matplotlib
At the end of the day, enthought.com is the easiest way to install everything.
这篇关于OSX-"NumPy/SciPy需要安装Python 2.6"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!