在Mac Mavericks OS 10.9上安装适用于Python 3.3的Numpy
我正试图在Mac Mavericks上为python 3.3安装numpy(以便运行matplotlibs)。我有一台Windows计算机,只需下载.exe文件就可以正确安装所有内容。然而,我对Mac世界是个新手,以前从未通过命令行安装过任何东西 我已经下载了Anaconda和XCode 我试过:在Mac Mavericks OS 10.9上安装适用于Python 3.3的Numpy,numpy,matplotlib,osx-mavericks,python-3.3,Numpy,Matplotlib,Osx Mavericks,Python 3.3,我正试图在Mac Mavericks上为python 3.3安装numpy(以便运行matplotlibs)。我有一台Windows计算机,只需下载.exe文件就可以正确安装所有内容。然而,我对Mac世界是个新手,以前从未通过命令行安装过任何东西 我已经下载了Anaconda和XCode 我试过: pip install numpy 我得到以下输出: Requirement already satisfied (use --upgrade to upgrade): numpy in ./ana
pip install numpy
我得到以下输出:
Requirement already satisfied (use --upgrade to upgrade): numpy in ./anaconda/lib/python2.7/site-packages
pip-3.3: command not found
看起来它已经安装了2.7,但我想要3.3!所以,接下来我试着:
pip-3.3 install numpy
我得到以下输出:
Requirement already satisfied (use --upgrade to upgrade): numpy in ./anaconda/lib/python2.7/site-packages
pip-3.3: command not found
我曾尝试在失败后使用anaconda(以前从未使用过anaconda):
在一切都说了又做了之后,我得到了这个信息:
# All requested packages already installed.
# packages in environment at /Users/username/anaconda/envs/myenv:
#
ipython 2.2.0 py34_1
matplotlib 1.3.1 np18py34_1
numpy 1.8.2 py34_0
scipy 0.14.0 np18py34_0
当我尝试将matplotlib导入Python 3.3时,这也不起作用。在我看来,这并没有为3.3安装numpy,而是为3.4安装
因此,我安装了Python3.4。然而,matplotlib和3.4之间似乎存在兼容性问题,所以回到3.3。。。此外,我无法将numpy导入3.4
在这里,人们发布类似问题的许多主题都有类似的问题。作为一个新的Mac用户,我似乎无法遵循这些方向,因为我的版本是新的Mavericks。例如,我在这里看到:
我打字的时候
which python
进了候机楼,我就
/Users/username/anaconda/bin/python
我不明白
/Library/Frameworks/Python.framework/Versions/3.3
就像那个主题中的用户建议我应该做的那样。事实上,在Mavericks上很难找到/Library文件夹。。但是,我找到了如何使~/库可见的方法。我下一个
cd Library/Frameworks
ls
看到:
EWSMac-GC.framework
没有Python.framework。在这一点上,我觉得我应该有那个目录才能继续。也许不是。现在我不知道如何继续,如果有人有任何建议,我将不胜感激。我现在已经为Python 3.4正确安装了numpy,但没有为Python 3.3正确安装numpy 我在终点站所做的:
cd ../..
pwd
输出:
/
2to3 python3-32 pythonw3.3
2to3-3.3 python3-config pythonw3.3-32
2to3-3.4 python3.3 pyvenv
brew python3.3-32 pyvenv-3.3
easy_install-3.4 python3.3-config pyvenv-3.4
idle3 python3.3m tclselect
idle3.3 python3.3m-config tclsh
idle3.4 python3.4 tclsh8.6
pip3 python3.4-32 tclvfse
pip3.4 python3.4-config teacup
pydoc3 python3.4m wish
pydoc3.3 python3.4m-config wish8.6
pydoc3.4 pythonw3
python3 pythonw3-32
Requirement already satisfied (use --upgrade to upgrade): numpy in /Library/Framework/Python.framework/Versions/3.4/lib/python3.4/site-packages
Downloading/unpacking python3.3
Could not find any downloads that satisfy the requirement python3.3
Cleaning up...
No distributions at all found for python3.3
命令:
cd usr/local/bin
ls
输出:
/
2to3 python3-32 pythonw3.3
2to3-3.3 python3-config pythonw3.3-32
2to3-3.4 python3.3 pyvenv
brew python3.3-32 pyvenv-3.3
easy_install-3.4 python3.3-config pyvenv-3.4
idle3 python3.3m tclselect
idle3.3 python3.3m-config tclsh
idle3.4 python3.4 tclsh8.6
pip3 python3.4-32 tclvfse
pip3.4 python3.4-config teacup
pydoc3 python3.4m wish
pydoc3.3 python3.4m-config wish8.6
pydoc3.4 pythonw3
python3 pythonw3-32
Requirement already satisfied (use --upgrade to upgrade): numpy in /Library/Framework/Python.framework/Versions/3.4/lib/python3.4/site-packages
Downloading/unpacking python3.3
Could not find any downloads that satisfy the requirement python3.3
Cleaning up...
No distributions at all found for python3.3
命令:
pip3 install numpy
有很多输出,许多行看起来像:
Downloading numpy-1.8.2-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_
然后这个输出:
10_9_x86_64.whl (12.0MB): 12.0MB downloaded
Installing collected packages: numpy
Successfully installed numpy
Cleaning up...
此命令按预期为3.4而不是3.3安装了numpy。如上所述,我现在在我的系统上都有。我不知道如果我先完全卸载3.4,它是否会安装在3.3上
我尝试为3.3安装numpy:
pip3 install numpy python3.3
输出:
/
2to3 python3-32 pythonw3.3
2to3-3.3 python3-config pythonw3.3-32
2to3-3.4 python3.3 pyvenv
brew python3.3-32 pyvenv-3.3
easy_install-3.4 python3.3-config pyvenv-3.4
idle3 python3.3m tclselect
idle3.3 python3.3m-config tclsh
idle3.4 python3.4 tclsh8.6
pip3 python3.4-32 tclvfse
pip3.4 python3.4-config teacup
pydoc3 python3.4m wish
pydoc3.3 python3.4m-config wish8.6
pydoc3.4 pythonw3
python3 pythonw3-32
Requirement already satisfied (use --upgrade to upgrade): numpy in /Library/Framework/Python.framework/Versions/3.4/lib/python3.4/site-packages
Downloading/unpacking python3.3
Could not find any downloads that satisfy the requirement python3.3
Cleaning up...
No distributions at all found for python3.3
我试着从Python3.4导入numpy,结果成功了。然而,我的主要目标是使用matplotlib。我试图从命令行安装matplotlib
pip3 install matplotlib
这很有效,现在我可以在python 3.4中使用matplotlib,在python 3.4中使用IDLE
不幸的是,这不能满足Python3.3的要求。。。但目前,3.4可能也没问题。通过安装程序库Homebrew安装python(matplotlib numpy集成等…)