Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
OSX通过brew for python3安装numpy_Python_Python 3.x_Numpy_Homebrew - Fatal编程技术网

OSX通过brew for python3安装numpy

OSX通过brew for python3安装numpy,python,python-3.x,numpy,homebrew,Python,Python 3.x,Numpy,Homebrew,我无法通过brew安装用于python3的numpy I类型: brew install numpy --with-python3 那么蟒蛇2就没问题了 Python 2.7.6 (default, Sep 9 2014, 15:04:36) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin Type "help", "copyright", "credits" or "license" for more in

我无法通过brew安装用于python3的numpy

I类型:

brew install numpy --with-python3
那么蟒蛇2就没问题了

Python 2.7.6 (default, Sep  9 2014, 15:04:36) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>>
但仍然没有找到python3

Python 3.4.0 (v3.4.0:04f714765c13, Mar 15 2014, 23:02:41) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'numpy'
>>>
Python 3.4.0(v3.4.0:04f714765c13,2014年3月15日,23:02:41)
[GCC 4.2.1(苹果公司建造5666)(dot 3)]关于达尔文
有关详细信息,请键入“帮助”、“版权”、“信用证”或“许可证”。
>>>进口numpy
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
ImportError:没有名为“numpy”的模块
>>>

如何使其适用于python3?

正确的安装方法是:

pip3 install numpy

显然,您需要先安装python3和pip。我进行了测试,工作没有任何问题。

自制软件的问题在于它只能看到系统的python和它自己安装的python。因此,您必须首先通过brew安装python3,然后使用--with-python3选项。

谢谢,我知道pip3工作正常。可能我不太准确,我需要从brew安装。它是关于特定版本和其他依赖项的。