如何安装使用conda启用gl2ps的vtk

时间:2015-03-05 11:23:31

标签: python compilation vtk anaconda conda

我正在使用anaconda,并且我已经使用

使用conda构建了vtk
conda install vtk

vtk的默认构建没有gl2ps,我想知道如何使用conda启用gl2ps来构建(或者更确切地说重建)vtk。

我实际上是想要解释这个示例代码:

 from mayavi import mlab
 mlab.test_plot3d()
 mlab.savefig(temp.eps)

但得到错误

Saving as a vector PS/EPS/PDF/TeX file using GL2PS is either not supported by your version of VTK or you have not configured VTK to work with GL2PS -- read the documentation for the vtkGL2PSExporter class.

谢谢

修改

我下载了coda-recipes

git clone https://github.com/conda/conda-recipes.git

即使我不编辑文件以包含gl2ps

BUILD START: vtk-5.10.1-py27_1
Fetching package metadata: ......
Solving package specifications: .
The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    setuptools-13.0.2          |           py27_0         435 KB

The following NEW packages will be INSTALLED:

    cmake:      3.0.1-0      
    openssl:    1.0.1k-0     
    pip:        6.0.8-py27_0 
    python:     2.7.9-1      
    readline:   6.2-2        
    setuptools: 13.0.2-py27_0
    sqlite:     3.8.4.1-0    
    system:     5.8-1        
    tk:         8.5.15-0     
    zlib:       1.2.8-0      

Fetching packages ...
setuptools-13. 100% |######################################################################################################################################################################################| Time: 0:00:00 463.16 kB/s
Extracting packages ...
[      COMPLETE      ] |########################################################################################################################################################################################################| 100%
Linking packages ...
[      COMPLETE      ] |########################################################################################################################################################################################################| 100%
Source cache directory is: /home/users/user/anaconda/conda-bld/src_cache
Downloading source to cache: vtk-5.10.1.tar.gz
An unexpected error has occurred, please consider sending the
following traceback to the conda GitHub issue tracker at:

    https://github.com/conda/conda-build/issues

Include the output of the command 'conda info' in your report.


Traceback (most recent call last):
  File "/home/users/user/anaconda/bin/conda-build", line 5, in <module>
    sys.exit(main())
  File "/home/users/user/anaconda/lib/python2.7/site-packages/conda_build/main_build.py", line 110, in main
    args_func(args, p)
  File "/home/users/user/anaconda/lib/python2.7/site-packages/conda_build/main_build.py", line 308, in args_func
    args.func(args, p)
  File "/home/users/user/anaconda/lib/python2.7/site-packages/conda_build/main_build.py", line 268, in execute
    build.build(m, verbose=not args.quiet, post=post)
  File "/home/users/user/anaconda/lib/python2.7/site-packages/conda_build/build.py", line 304, in build
    source.provide(m.path, m.get_section('source'))
  File "/home/users/user/anaconda/lib/python2.7/site-packages/conda_build/source.py", line 221, in provide
    unpack(meta)
  File "/home/users/user/anaconda/lib/python2.7/site-packages/conda_build/source.py", line 60, in unpack
    src_path = download_to_cache(meta)
  File "/home/users/user/anaconda/lib/python2.7/site-packages/conda_build/source.py", line 48, in download_to_cache
    download(meta['url'], path)
KeyError: 'url'

1 个答案:

答案 0 :(得分:3)

用于构建vtk的配方是here。您应该修改它以包含该包并使用conda build vtk/进行构建。