2017-07-20 21 views
0

Ich versuche, oct2py in einem meiner Python-Skripte zu verwenden, habe Oktav in C:\Octave\Octave-4.2.1 installiert und habe C:\Octave\Octave-4.2.1 zu meiner PATH-Variable für mein Benutzerkonto hinzugefügt. Als ich from oct2py import octave laufen bekomme ich folgende Fehlermeldung:oct2py Importfehler: Das System kann die angegebene Datei nicht finden

Traceback (most recent call last): 
    File "C:\Users\CVanCleef\Desktop\cvancleef reconstruction\filterTestin.py", line 12, in <module> 
    from oct2py import octave 
    File "C:\Users\CVanCleef\AppData\Local\Continuum\Anaconda3\lib\site-packages\oct2py\__init__.py", line 38, in <module> 
    octave = Oct2Py() 
    File "C:\Users\CVanCleef\AppData\Local\Continuum\Anaconda3\lib\site-packages\oct2py\core.py", line 73, in __init__ 
    self.restart() 
    File "C:\Users\CVanCleef\AppData\Local\Continuum\Anaconda3\lib\site-packages\oct2py\core.py", line 508, in restart 
    logger=self.logger) 
    File "C:\Users\CVanCleef\AppData\Local\Continuum\Anaconda3\lib\site-packages\octave_kernel\kernel.py", line 144, in __init__ 
    self.repl = self._create_repl() 
    File "C:\Users\CVanCleef\AppData\Local\Continuum\Anaconda3\lib\site-packages\octave_kernel\kernel.py", line 338, in _create_repl 
    version = subprocess.check_output(version_cmd).decode('utf-8') 
    File "C:\Users\CVanCleef\AppData\Local\Continuum\Anaconda3\lib\subprocess.py", line 316, in check_output 
    **kwargs).stdout 
    File "C:\Users\CVanCleef\AppData\Local\Continuum\Anaconda3\lib\subprocess.py", line 383, in run 
    with Popen(*popenargs, **kwargs) as process: 
    File "C:\Users\CVanCleef\AppData\Local\Continuum\Anaconda3\lib\subprocess.py", line 676, in __init__ 
    restore_signals, start_new_session) 
    File "C:\Users\CVanCleef\AppData\Local\Continuum\Anaconda3\lib\subprocess.py", line 955, in _execute_child 
    startupinfo) 
FileNotFoundError: [WinError 2] The system cannot find the file specified 

EDIT: OCTAVE_EXECUTABLE auf meinem Weg Nach dem Hinzufügen, erhalte ich die Fehler

Traceback (most recent call last): 
    File "C:\Users\CVanCleef\Desktop\cvancleef reconstruction\filterTestin.py", line 12, in <module> 
    from oct2py import octave 
    File "C:\Users\CVanCleef\AppData\Local\Continuum\Anaconda3\lib\site-packages\oct2py\__init__.py", line 38, in <module> 
    octave = Oct2Py() 
    File "C:\Users\CVanCleef\AppData\Local\Continuum\Anaconda3\lib\site-packages\oct2py\core.py", line 73, in __init__ 
    self.restart() 
    File "C:\Users\CVanCleef\AppData\Local\Continuum\Anaconda3\lib\site-packages\oct2py\core.py", line 508, in restart 
    logger=self.logger) 
    File "C:\Users\CVanCleef\AppData\Local\Continuum\Anaconda3\lib\site-packages\octave_kernel\kernel.py", line 144, in __init__ 
    self.repl = self._create_repl() 
    File "C:\Users\CVanCleef\AppData\Local\Continuum\Anaconda3\lib\site-packages\octave_kernel\kernel.py", line 338, in _create_repl 
    version = subprocess.check_output(version_cmd).decode('utf-8') 
    File "C:\Users\CVanCleef\AppData\Local\Continuum\Anaconda3\lib\subprocess.py", line 316, in check_output 
    **kwargs).stdout 
    File "C:\Users\CVanCleef\AppData\Local\Continuum\Anaconda3\lib\subprocess.py", line 383, in run 
    with Popen(*popenargs, **kwargs) as process: 
    File "C:\Users\CVanCleef\AppData\Local\Continuum\Anaconda3\lib\subprocess.py", line 676, in __init__ 
    restore_signals, start_new_session) 
    File "C:\Users\CVanCleef\AppData\Local\Continuum\Anaconda3\lib\subprocess.py", line 955, in _execute_child 
    startupinfo) 
PermissionError: [WinError 5] Access is denied 
+0

entfernt, wie ich mich erinnere, müssen Sie nicht eine Art von 'OCTAVE_PATH' Umgebungsvariable speziell für oct2py setzen? ** BEARBEITEN: ** Die [oct2py Dokumentation] (http://blink1073.github.io/oct2py/source/installation.html) erwähnt am Ende der Seite: "Alternativ können Sie den Pfad zu Ihrer Octave ausführbaren Datei angeben indem Sie eine Umgebungsvariable OCTAVE_EXECUTABLE erstellen. " –

+0

Ich habe OCTAVE_EXECUTABLE zu meinem Pfad hinzugefügt, jetzt habe ich einen anderen Fehler, der an der gleichen Stelle zu passieren scheint. – cowchin12

Antwort

1

Haben Sie Ihr System nach dem Ändern der PATH-Variable neu gestartet?

Ich hatte dieses Problem vor dem Laden in einem anderen Modul und löste es durch den Neustart meines Systems.

+0

Ich tat, habe immer noch den Fehler – cowchin12

0

Wird behoben, indem eine Pfadvariable OCTAVE_EXECUTABLE hinzugefügt wird und der Wert OCTAVE_EXECUTABLE auf C:\Octave\Octave-4.2.1\bin\octave-cli.exe gesetzt wird. Ich habe auch die Oktav-Referenz von meinem PATH

+0

Das macht keinen Sinn (da Pfad ein Verzeichnis sein muss). Vermutlich meinst du "setze ich den Pfad zu' C: \ Octave \ Octave-4.2.1 \ bin' und OCTAVE_EXECUTABLE zu 'C: \ Octave \ Octave-4.2.1 \ bin \ octave-cli.exe'"? In jedem Fall musstest du wahrscheinlich nur das eine oder andere tun. –

+0

Danke, schlechte Formulierung von mir – cowchin12

Verwandte Themen