python pip安装失败vtk_python – 安装Mayavi与pip – 没有模块命名为vtk

我想用Mayavi。

情况

>我使用MacBook Air,与OSX 10.7.3。

>我使用Python 2.7.2

>我已经安装了virtualenv。但是我没有用这个安装。

我手动安装了所有的依赖项,包括VTK。

对于VTK,我遵循其安装指南并安装了python包装。

现在如果我打开一个新的终端窗口并打开python,我可以导入vtk没有任何错误。

问题

我尝试使用以下命令安装Mayavi:

pip install mayavi

但是出现以下错误:

Downloading/unpacking mayavi

Running setup.py egg_info for package mayavi

build_src

building extension "tvtk.array_ext" sources

building data_files sources

build_src: building npy-pkg config files

no previously-included directories found matching 'artwork'

no previously-included directories found matching 'docs/pdf'

Requirement already satisfied (use --upgrade to upgrade): apptools in /Library/Python/2.7/site-packages (from mayavi)

Requirement already satisfied (use --upgrade to upgrade): traits in /Library/Python/2.7/site-packages (from mayavi)

Requirement already satisfied (use --upgrade to upgrade): traitsui in /Library/Python/2.7/site-packages (from mayavi)

Requirement already satisfied (use --upgrade to upgrade): configobj in /Library/Python/2.7/site-packages (from apptools->mayavi)

Requirement already satisfied (use --upgrade to upgrade): pyface in /Library/Python/2.7/site-packages (from traitsui->mayavi)

Installing collected packages: mayavi

Running setup.py install for mayavi

Traceback (most recent call last):

File "", line 1, in

File "/Users/Yasser/build/mayavi/setup.py", line 498, in

**config

File "/Library/Python/2.7/site-packages/numpy-1.6.1-py2.7-macosx-10.7-intel.egg/numpy/distutils/core.py", line 186, in setup

return old_setup(**new_attr)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup

dist.run_commands()

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands

self.run_command(cmd)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command

cmd_obj.run()

File "/Library/Python/2.7/site-packages/numpy-1.6.1-py2.7-macosx-10.7-intel.egg/numpy/distutils/command/install.py", line 57, in run

r = self.setuptools_run()

File "/Library/Python/2.7/site-packages/numpy-1.6.1-py2.7-macosx-10.7-intel.egg/numpy/distutils/command/install.py", line 31, in setuptools_run

return old_install_mod._install.run(self)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install.py", line 573, in run

self.run_command('build')

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command

self.distribution.run_command(command)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command

cmd_obj.run()

File "/Users/Yasser/build/mayavi/setup.py", line 303, in run

build_tvtk_classes_zip()

File "/Users/Yasser/build/mayavi/setup.py", line 290, in build_tvtk_classes_zip

gen_tvtk_classes_zip()

File "tvtk/setup.py", line 46, in gen_tvtk_classes_zip

from code_gen import TVTKGenerator

File "tvtk/code_gen.py", line 10, in

import vtk

ImportError: No module named vtk

Complete output from command /usr/bin/python -c "import setuptools;__file__='/Users/Yasser/build/mayavi/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /var/folders/53/_trhc_0x0fb6kvx6bw_wrk500000gn/T/pip-Z4hpsW-record/install-record.txt:

running install

running build

Traceback (most recent call last):

File "", line 1, in

File "/Users/Yasser/build/mayavi/setup.py", line 498, in

**config

File "/Library/Python/2.7/site-packages/numpy-1.6.1-py2.7-macosx-10.7-intel.egg/numpy/distutils/core.py", line 186, in setup

return old_setup(**new_attr)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup

dist.run_commands()

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands

self.run_command(cmd)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command

cmd_obj.run()

File "/Library/Python/2.7/site-packages/numpy-1.6.1-py2.7-macosx-10.7-intel.egg/numpy/distutils/command/install.py", line 57, in run

r = self.setuptools_run()

File "/Library/Python/2.7/site-packages/numpy-1.6.1-py2.7-macosx-10.7-intel.egg/numpy/distutils/command/install.py", line 31, in setuptools_run

return old_install_mod._install.run(self)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install.py", line 573, in run

self.run_command('build')

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command

self.distribution.run_command(command)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command

cmd_obj.run()

File "/Users/Yasser/build/mayavi/setup.py", line 303, in run

build_tvtk_classes_zip()

File "/Users/Yasser/build/mayavi/setup.py", line 290, in build_tvtk_classes_zip

gen_tvtk_classes_zip()

File "tvtk/setup.py", line 46, in gen_tvtk_classes_zip

from code_gen import TVTKGenerator

File "tvtk/code_gen.py", line 10, in

import vtk

ImportError: No module named vtk

----------------------------------------

Command /usr/bin/python -c "import setuptools;__file__='/Users/Yasser/build/mayavi/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /var/folders/53/_trhc_0x0fb6kvx6bw_wrk500000gn/T/pip-Z4hpsW-record/install-record.txt failed with error code 1 in /Users/Yasser/build/mayavi

Storing complete log in /Users/Yasser/Library/Logs/pip.log

Traceback (most recent call last):

File "/usr/local/bin/pip", line 8, in

load_entry_point('pip==1.1', 'console_scripts', 'pip')()

File "/Library/Python/2.7/site-packages/pip-1.1-py2.7.egg/pip/__init__.py", line 116, in main

return command.main(args[1:], options)

File "/Library/Python/2.7/site-packages/pip-1.1-py2.7.egg/pip/basecommand.py", line 141, in main

log_fp = open_logfile(log_fn, 'w')

File "/Library/Python/2.7/site-packages/pip-1.1-py2.7.egg/pip/basecommand.py", line 168, in open_logfile

log_fp = open(filename, mode)

IOError: [Errno 13] Permission denied: '/Users/Yasser/Library/Logs/pip.log'

我认为问题是与vtk。

有人可以帮我吗

其他详情

运行sudo pip安装mayavi不能解决问题。

我以为这可能有帮助

› which python

/usr/local/bin/python

› python

Python 2.7.2 (default, Feb 17 2012, 13:57:55)

[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin

Type "help", "copyright", "credits" or "license" for more information.

>>> import vtk

>>> vtk

>>>

我的PYTHONPATH是空的。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值