How to add Octave to my PATH to use oct2py?

Final Editing: Adding

export PATH=/usr/local/octave/3.8.0/bin:$PATH

for my path was really enough to let oct2py work properly (until I restarted my terminal after the change). Hooray!

---- Original post ----

I have successfully completed the installation of oct2py and pexpect, but I am having problems trying to import and use oct2py. Firstly, when you try to do the following:

import oct2py

I received the following error message:

Please install GNU Octave and put it in your path

So, I added the following lines to ~ / usr / .bash_profile

export PATH=/usr/local/octave-3.8.0/bin:${PATH}
export PATH=/usr/local/octave-3.8.0/sbin:${PATH}

And now I can successfully import the oct2py module in python. However, when trying to initialize it with:

oc = oct2py.Oct2Py()

, . PATH, python, Octave? , , ?

Edit: , "import oct2py" - PATH, , . , , PATH, , .

+4
1

.bash_profile oct2py .

export PATH=/usr/local/octave/3.8.0/bin:$PATH

PATH!

+1

Source: https://habr.com/ru/post/1541223/


All Articles