2017-09-25 4 views
0

ich folgende Fehlermeldung habe, wenn ich VTK mit Python durchVTK mit Python 3.6, Anaconda 4.4

anaconda laufen
[email protected]:~# conda install -c clinicalgraphics vtk=7.1.0 
Fetching package metadata ........... 
Solving package specifications: . 

# All requested packages already installed. 
# packages in environment at /home/user/anaconda3: 
# 
vtk      7.1.0     py36_3 clinicalgraphics 
[email protected]~# python 
Python 3.6.1 |Anaconda 4.4.0 (64-bit)| (default, May 11 2017, 13:09:58) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux 
Type "help", "copyright", "credits" or "license" for more information. 
>>> import vtk 
Traceback (most recent call last): 
    File "/home/user/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCore.py", line 5, in <module> 
    from .vtkCommonCorePython import * 
ImportError: /home/user/anaconda3/lib/python3.6/site-packages/vtk/../../../libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/user/anaconda3/lib/python3.6/site-packages/vtk/../../../libvtkCommonCorePython36D-7.1.so.1) 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    File "/home/user/anaconda3/lib/python3.6/site-packages/vtk/__init__.py", line 41, in <module> 
    from .vtkCommonCore import * 
    File "/home/user/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCore.py", line 9, in <module> 
    from vtkCommonCorePython import * 
ModuleNotFoundError: No module named 'vtkCommonCorePython' 

Ich habe versucht, die Lösung in Install vtk with python 3.6 und No module ImportError präsentiert mit, sie scheinen nicht zu arbeiten. Überraschenderweise habe ich dieses Problem in meiner Windows-Distribution nicht. Jeder alternative Vorschlag ist willkommen. Ich versuche wirklich, das Herunterstufen von Python3 zu Python2 zu vermeiden oder eine separate Conda-Umgebung nur für vtk..aber wenn es am Ende ist ... Ich denke, ich muss das machen. Ich versuchte, die Bibliothek meines eigenen Builds von vtk 8 zu verbinden ... das scheint nicht so gut zu funktionieren

Antwort

0

Also habe ich am Ende eine neue Umgebung basierend auf Menpo Vtk = 7 Python = 3 mit den folgenden Befehlen erstellt

[email protected]:~# conda create --name VTKpythonENV python=3 
    ....... 
[email protected]:~# conda install -n VTKpythonENV -c menpo vtk=7 python=3 
.......... 
[email protected]:~# source activate VTKpythonENV 
(VTKpythonENV) [email protected]:~# python 
Python 3.6.2 |Continuum Analytics, Inc.| (default, Jul 20 2017, 13:51:32) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux 
Type "help", "copyright", "credits" or "license" for more information. 
>>> import vtk 

Dies funktioniert für mich, aber andere Vorschläge klinischen Grafiken VTK verwenden begrüßen auch

Verwandte Themen