尝试在VM上的ubuntu上安装和设置numpy 1.7.1 for python2.7时出现错误

时间:2013-09-05 09:21:01

标签: python numpy

早上好,

我已经尝试了一天,在运行Ubuntu的VM上设置和安装numpy。但是我一直不成功。 Python 2.7已正确安装(为什么这不是所有需要的库?)。但是,在尝试构建numpy时,我收到以下错误;

>>

running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building py_modules sources
error: build/src.linux-i686-2.7/numpy/distutils/__config__.py: Permission denied

>>

如果我尝试在我的python解释器中导入numpy,我会得到以下内容

>>> numpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'numpy' is not defined
>>> import numpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/numpy/__init__.py", line 137, in <module>
    import add_newdocs
  File "/usr/local/lib/python2.7/dist-packages/numpy/add_newdocs.py", line 9, in <module>
    from numpy.lib import add_newdoc
  File "/usr/local/lib/python2.7/dist-packages/numpy/lib/__init__.py", line 4, in <module>
    from type_check import *
  File "/usr/local/lib/python2.7/dist-packages/numpy/lib/type_check.py", line 8, in <module>
    import numpy.core.numeric as _nx
  File "/usr/local/lib/python2.7/dist-packages/numpy/core/__init__.py", line 5, in <module>
    import multiarray
ImportError: /usr/local/lib/python2.7/dist-packages/numpy/core/multiarray.so: undefined symbol: PyUnicodeUCS2_AsASCIIString
>>> 

我所要做的就是将python与numpy库一起使用。这不应该那么难,不是吗?

干杯。

杰里米

0 个答案:

没有答案