How to install oct2py on windows?

Donbeo

I want to install oct2py in python. I am using windows 8.1

I used the command easy_install oct2py and I installed octave with the standard exe file. Now according to the installation guide I should add the octave path.

setx PATH "%PATH%;<path-to-octave-bin-dir>

I did not understand this command. I tried to add the path where is the octave.exe file to the environmental variables.

But when I try to import oct2py I get an error.

>>> import oct2py


Please install GNU Octave and put it in your path

>>> 

Can anyone please explain me exactly how to set the path?
An example of the command that I should run on the terminal would be very useful. Thanks

EDIT: I tried

setx PATH "%PATH%;C:\Software\Octave-3.6.4\bin"

but I received a strange message:

WARNINGS: The data being saved is truncated to 1024 characters
SUCCESS: Specified value was saved
mhlester

I'm not personally familiar with Octave, but it seems I've helped resolve this question. For others who may stumble upon this issue in the future, here's the process that led to the solution:


Given the error Please install GNU Octave and put it in your path, I searched the source code and found this from _utils.py:

try:
    cmd = 'octave -q --braindead'
    session = subprocess.Popen(cmd, shell=True,
                             stderr=subprocess.STDOUT,
                             stdin=subprocess.PIPE,
                             stdout=subprocess.PIPE,
                             preexec_fn=os.setsid)
except OSError:
    octave_path = glob('c:/Octave/*/bin/octave.exe')[0]
    if not os.path.exists(octave_path):
        msg = ('Please install Octave at "c:/Octave" '
                 '  or put it in your path:\n'
                 'setx PATH "%PATH%;<path-to-octave-bin-dir>"')
        raise Oct2PyError(msg)
    else:
        cmd = 'octave -q --braindead'
        session = subprocess.Popen(cmd, shell=True,
                             stderr=subprocess.STDOUT,
                             stdin=subprocess.PIPE,
                             stdout=subprocess.PIPE,
                             preexec_fn=os.setsid)
except OSError:
    raise Oct2PyError('Please put the Octave executable in your PATH')
return session

So this is raised when the command octave -q --braindead is attempted and fails


Next I asked OP whether the command ran properly on the command line, in order to isolate the problem. Running that, OP learned :MSYS shell available C:\Software\Octave-3.6.4\msys

Including that in the path is the solution

tl;dr

Path should not just be

C:\Software\Octave-[version]\bin

but rather

C:\Software\Octave-[version]\msys

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

如何在Windows上安装oct2py?

来自分类Dev

以oct2py打印要显示的值

来自分类Dev

导入 oct2py 表示访问被拒绝

来自分类Dev

How to install pyYAML on windows 10

来自分类Dev

安装了oct2py软件包,但导入时无法识别

来自分类Dev

Anaconda / Spyder中的oct2py无法识别八度

来自分类常见问题

How to pip or easy_install tkinter on Windows

来自分类Dev

在Google Colab中对* .m(Matlab)文件使用Oct2Py后未定义“ exists_or_mkdir”

来自分类Dev

How to package and install Windows 10 application on other computers

来自分类Dev

C# How to create a Setup project for a Windows Service to install it automagically?

来自分类Dev

How to install Boost.Python on Windows 7 in order to install a python package?

来自分类Dev

Can someone explain how I got a Windows EFI error message without trying to install Windows?

来自分类Dev

Can someone explain how I got a Windows EFI error message without trying to install Windows?

来自分类Dev

How do I install Windows 10 from USB to a UEFI Secure Boot Machine

来自分类Dev

trying to install windows after ubuntu

来自分类Dev

gem install pam ... 在 Windows 上

来自分类Dev

在Windows 10上使用pip install xx.whl安装rpy2

来自分类Dev

Python:Windows 10上的“ pip install gmpy”返回“ cl.exe'失败,退出状态为2”

来自分类Dev

How to install sendmail in CentOS?

来自分类Dev

在Windows 7上npm install restify错误?

来自分类Dev

Windows 10上的gem install bson失败

来自分类Dev

Windows中的`gem install berkshelf`失败

来自分类Dev

Windows的Linux Install命令等效于什么?

来自分类Dev

Windows Install Automake在配置时失败

来自分类Dev

Windows上的TensorFlow:“ pip install tensorflow”失败

来自分类Dev

Code to install a printer driver works on Windows 7 but not Windows 8

来自分类Dev

Install Windows HDD into MacBook Pro and boot Windows 10 TP

来自分类Dev

How to install subprocess module for python?

来自分类Dev

How to install stagefright on my android?

Related 相关文章

  1. 1

    如何在Windows上安装oct2py?

  2. 2

    以oct2py打印要显示的值

  3. 3

    导入 oct2py 表示访问被拒绝

  4. 4

    How to install pyYAML on windows 10

  5. 5

    安装了oct2py软件包,但导入时无法识别

  6. 6

    Anaconda / Spyder中的oct2py无法识别八度

  7. 7

    How to pip or easy_install tkinter on Windows

  8. 8

    在Google Colab中对* .m(Matlab)文件使用Oct2Py后未定义“ exists_or_mkdir”

  9. 9

    How to package and install Windows 10 application on other computers

  10. 10

    C# How to create a Setup project for a Windows Service to install it automagically?

  11. 11

    How to install Boost.Python on Windows 7 in order to install a python package?

  12. 12

    Can someone explain how I got a Windows EFI error message without trying to install Windows?

  13. 13

    Can someone explain how I got a Windows EFI error message without trying to install Windows?

  14. 14

    How do I install Windows 10 from USB to a UEFI Secure Boot Machine

  15. 15

    trying to install windows after ubuntu

  16. 16

    gem install pam ... 在 Windows 上

  17. 17

    在Windows 10上使用pip install xx.whl安装rpy2

  18. 18

    Python:Windows 10上的“ pip install gmpy”返回“ cl.exe'失败,退出状态为2”

  19. 19

    How to install sendmail in CentOS?

  20. 20

    在Windows 7上npm install restify错误?

  21. 21

    Windows 10上的gem install bson失败

  22. 22

    Windows中的`gem install berkshelf`失败

  23. 23

    Windows的Linux Install命令等效于什么?

  24. 24

    Windows Install Automake在配置时失败

  25. 25

    Windows上的TensorFlow:“ pip install tensorflow”失败

  26. 26

    Code to install a printer driver works on Windows 7 but not Windows 8

  27. 27

    Install Windows HDD into MacBook Pro and boot Windows 10 TP

  28. 28

    How to install subprocess module for python?

  29. 29

    How to install stagefright on my android?

热门标签

归档