Mayavi: Problem beim Installieren von Mayavi mit pip - kein Modul namens vtk

Erstellt am 29. Aug. 2012  ·  5Kommentare  ·  Quelle: enthought/mayavi

Ich möchte Mayavi verwenden.

Situation

  • Ich verwende ein MacBook Air mit OSX 10.7.3.
  • Ich benutze Python 2.7.2
  • Ich habe virtualenv installiert. Aber ich habe es nicht für diese Installation verwendet.

Ich habe alle Abhängigkeiten manuell installiert, einschließlich VTK .

Für VTK bin ich der Installationsanleitung gefolgt und habe den Python-Wrapper installiert.

Wenn ich nun ein neues Terminalfenster öffne und Python öffne, kann ich vtk ohne Fehler importieren.

Problem

Ich versuche Mayavi mit folgendem Befehl zu installieren:

pip install mayavi

Aber folgender Fehler tritt auf:

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 "<string>", line 1, in <module>
      File "/Users/Yasser/build/mayavi/setup.py", line 498, in <module>
        **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 <module>
        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 "<string>", line 1, in <module>

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

    **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 <module>

    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 <module>
    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'

Ich denke, das Problem liegt bei vtk .

Kann mir jemand helfen?

Andere Details

Das Ausführen von sudo pip install mayavi löst das Problem nicht.

Ich dachte das könnte helfen

› 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
<module 'vtk' from '/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/VTK-5.10.0-py2.7.egg/vtk/__init__.pyc'>
>>> 

Mein PYTHONPATH ist leer.

Alle 5 Kommentare

Hallo Yasser,

Es scheint, dass das von pip verwendete Python vtk nicht importieren kann. Du hast überprüft
dass Sie vtk erfolgreich importieren können, aber vielleicht haben Sie anderes Python
ausführbare Dateien installieren und pip verwendet eine andere als die mit
die Sie vtk importieren können. Betrachten Sie Ihren Traceback, den Python, der pip
verwendet ist /usr/bin/python.

HTH,

Gaël

Am Mittwoch, den 29. August 2012 um 10:40:26 -0700 schrieb Yasser Souri:

Ich möchte Mayavi verwenden.

Situation

• Ich verwende ein MacBook Air mit OSX 10.7.3.
• Ich verwende Python 2.7.2
• Ich habe virtualenv installiert. Aber ich habe es nicht für diese Installation verwendet.

Ich habe alle Abhängigkeiten, einschließlich VTK, manuell installiert.

Für VTK bin ich der Installationsanleitung gefolgt und habe den Python-Wrapper installiert.

Wenn ich jetzt ein neues Terminalfenster öffne und Python öffne, kann ich vtk ohne importieren
irgendein Fehler.

Problem

Ich versuche Mayavi mit folgendem Befehl zu installieren:

pip installieren mayavi

Aber folgender Fehler tritt auf:

Herunterladen/Entpacken von mayavi
Ausführen von setup.py egg_info für das Paket mayavi
build_src
Gebäudeerweiterung "tvtk.array_ext" Quellen
Erstellen von data_files-Quellen
build_src: npy-pkg-Konfigurationsdateien erstellen

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

Voraussetzung bereits erfüllt (zum Upgrade --upgrade verwenden): apptools in /Library/Python/2.7/site-packages (von mayavi)
Anforderung bereits erfüllt (zum Upgrade --upgrade verwenden): Traits in /Library/Python/2.7/site-packages (von mayavi)
Anforderung bereits erfüllt (zum Upgrade --upgrade verwenden): traitsui in /Library/Python/2.7/site-packages (von mayavi)
Anforderung bereits erfüllt (zum Upgrade --upgrade verwenden): configobj in /Library/Python/2.7/site-packages (von apptools->mayavi)
Anforderung bereits erfüllt (zum Upgrade --upgrade verwenden): pyface in /Library/Python/2.7/site-packages (von traitsui->mayavi)
Gesammelte Pakete installieren: mayavi
Ausführen von setup.py install für mayavi
Traceback (letzter Anruf zuletzt):
Datei "", Zeile 1, in
Datei "/Users/Yasser/build/mayavi/setup.py", Zeile 498, in
KonfigurationDatei "/Library/Python/2.7/site-packages/numpy-1.6.1-py2.7-macosx-10.7-intel.egg/numpy/distutils/core.py", Zeile 186, im Setupaltes_setup( new_attr) zurückgeben
Datei "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", Zeile 152, im Setup
dist.run_commands()
Datei "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", Zeile 953, in run_commands
self.run_command(cmd)
Datei "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", Zeile 972, in run_command
cmd_obj.run()
Datei "/Library/Python/2.7/site-packages/numpy-1.6.1-py2.7-macosx-10.7-intel.egg/numpy/distutils/command/install.py", Zeile 57, in Run
r = self.setuptools_run()
Datei "/Library/Python/2.7/site-packages/numpy-1.6.1-py2.7-macosx-10.7-intel.egg/numpy/distutils/command/install.py", Zeile 31, in setuptools_run
return old_install_mod._install.run(self)
Datei "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install.py", Zeile 573, in Run
self.run_command('build')
Datei "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", Zeile 326, in run_command
self.distribution.run_command(Befehl)
Datei "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", Zeile 972, in run_command
cmd_obj.run()
Datei "/Users/Yasser/build/mayavi/setup.py", Zeile 303, in Ausführung
build_tvtk_classes_zip()
Datei "/Users/Yasser/build/mayavi/setup.py", Zeile 290, in build_tvtk_classes_zip
gen_tvtk_classes_zip()
Datei "tvtk/setup.py", Zeile 46, in gen_tvtk_classes_zip
from code_gen import TVTKGenerator
Datei "tvtk/code_gen.py", Zeile 10, in
vtk importieren
ImportError: Kein Modul namens vtk
Vervollständigen Sie die Ausgabe des Befehls /usr/bin/python -c "import setuptools;__file__='/Users/Yasser/build/mayavi/setup.py';exec(compile(open( file ).read().replace('rn ', 'n'), file , 'exec'))" install --single-version-externally-managed --record /var/folders/53/_trhc_0x0fb6kvx6bw_wrk500000gn/T/pip-Z4hpsW-record/install-record.txt :
laufende Installation

laufender Build

Traceback (letzter Anruf zuletzt):

Datei "", Zeile 1, in

Datei "/Users/Yasser/build/mayavi/setup.py", Zeile 498, in

**config

Datei "/Library/Python/2.7/site-packages/numpy-1.6.1-py2.7-macosx-10.7-intel.egg/numpy/distutils/core.py", Zeile 186, im Setup

return old_setup(**new_attr)

Datei "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", Zeile 152, im Setup

dist.run_commands()

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

self.run_command(cmd)

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

cmd_obj.run()

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

r = self.setuptools_run()

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

return old_install_mod._install.run(self)

Datei "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install.py", Zeile 573, in Run

self.run_command('build')

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

self.distribution.run_command(command)

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

cmd_obj.run()

Datei "/Users/Yasser/build/mayavi/setup.py", Zeile 303, in Ausführung

build_tvtk_classes_zip()

Datei "/Users/Yasser/build/mayavi/setup.py", Zeile 290, in build_tvtk_classes_zip

gen_tvtk_classes_zip()

Datei "tvtk/setup.py", Zeile 46, in gen_tvtk_classes_zip

from code_gen import TVTKGenerator

Datei "tvtk/code_gen.py", Zeile 10, in

import vtk

ImportError: Kein Modul namens vtk


Befehl /usr/bin/python -c "importiere setuptools; file ='/Users/Yasser/build/mayavi/setup.py';exec(compile(open( file ).read().replace('rn', ' n'), file , 'exec'))" install --single-version-externally-managed --record /var/folders/53/_trhc_0x0fb6kvx6bw_wrk500000gn/T/pip-Z4hpsW-record/install-record.txt mit Fehler fehlgeschlagen Code 1 in /Benutzer/Yasser/build/mayavi
Vollständige Anmeldung speichern in /Users/Yasser/Library/Logs/pip.log
Traceback (letzter Anruf zuletzt):
Datei "/usr/local/bin/pip", Zeile 8, in
load_entry_point('pip==1.1', 'console_scripts', 'pip')()
Datei "/Library/Python/2.7/site-packages/pip-1.1-py2.7.egg/pip/__init__.py", Zeile 116, in main
return command.main(args[1:], Optionen)
Datei "/Library/Python/2.7/site-packages/pip-1.1-py2.7.egg/pip/basecommand.py", Zeile 141, in main
log_fp = open_logfile(log_fn, 'w')
Datei "/Library/Python/2.7/site-packages/pip-1.1-py2.7.egg/pip/basecommand.py", Zeile 168, in open_logfile
log_fp = open(Dateiname, Modus)
IOError: [Errno 13] Berechtigung verweigert: '/Users/Yasser/Library/Logs/pip.log'

Ich denke, das Problem liegt bei vtk.

Kann mir jemand helfen?

Andere Details

Das Ausführen von sudo pip install mayavi löst das Problem nicht.

Ich dachte das könnte helfen

› welche python
/usr/local/bin/python

› Python
Python 2.7.2 (Standard, 17. Februar 2012, 13:57:55)
[GCC 4.2.1 (Basierend auf Apple Inc. Build 5658) (LLVM Build 2335.15.00)] auf darwin
Geben Sie "Hilfe", "Copyright", "Credits" oder "Lizenz" ein, um weitere Informationen zu erhalten.

vtk importieren
vtk

Mein PYTHONPATH ist leer.


Antworten Sie direkt auf diese E-Mail oder zeigen Sie sie auf GitHub an.

*

Gael Varoquaux
Researcher, INRIA Parietal
Laboratoire de Neuro-Imagerie Assistee par Ordinateur
NeuroSpin/CEA Saclay , Bat 145, 91191 Gif-sur-Yvette France
Phone:  ++ 33-1-69-08-79-68
http://gael-varoquaux.info            http://twitter.com/GaelVaroquaux

Gut. Stack Overflow ist wahrscheinlich der beste Ort, um diese Fragen zu stellen: Die Leute reagieren schneller als ich.

Ich habe das gleiche Problem unter Windows. pip ist richtig. Kann jemand helfen?
Übrigens - es gibt kein Modul mit dem Namen 'vtk', sondern nur 'pyvtk'.

War diese Seite hilfreich?
0 / 5 - 0 Bewertungen