Liv
Liv

Reputation: 23

ImportError: cannot import name 'octave' from 'oct2py'

I have issues with the oct2py package ( I think...) trying to import octave from oct2py. from oct2py import Oct2Py does work.

I get the error:

ImportError: cannot import name 'octave' from 'oct2py'

trying to do:

from piwavelet.piwavelet import wcoherence, wcross, plotWavelet

I've installed octave through the link: [https://octave.org/download#ms-windows][1]

I've tried from one of the comments from oct2py isn't seeing OCTAVE_EXECUTABLE environment variable (Windows):

  1. Download Octave as a .7z file and unzip it to hard disk
  2. Run post-install.bat (from the folder entitled octave-5.2.0-w64 or something similar)
  3. Restart Windows 10 machine (due to messages encountered during run of post-install.bat)
  4. Run octave-firsttime.vbs
  5. Quit the Octave program
  6. Execute the following python code (in 3.7.6)

and

import os

pathToExecutable = (
    'D:\\wherever\\you\\put\\this\\octave-cli.exe'
)

os.environ['OCTAVE_EXECUTABLE'] = pathToExecutable
from oct2py import octave

I've tried changing the import and path in the _init_ and core files in the oct2py module folder.

But so far none of the options I can find work...

any idea on how to solve this? Many thanks

Upvotes: 1

Views: 142

Answers (0)

Related Questions