1

I have just installed the oct2py python package using the following command on my Windows:

pip install oct2py

However, whenever I try to import the package oct2py in my python script, I get the error: No module named "oct2py"

What is it that is making me have this error?

Wallflower
  • 550
  • 1
  • 4
  • 13
  • 2
    Could it be because different python version and that your command pip install oct2py installed it to the python you have added to your environment variables? LMK. – Wallflower Jan 18 '21 at 11:16
  • Have not thought about this, but let me check please! – overthinker Jan 18 '21 at 11:17
  • Does [this](https://stackoverflow.com/questions/54651597/oct2py-isnt-seeing-octave-executable-environment-variable-windows) answer your question? – Wallflower Jan 18 '21 at 11:21

1 Answers1

1

Change your environment variable from 'C:\Program Files\Python39' to this one 'C:\Users\YOU\AppData\Local\Programs\Python\Python39'.

Wallflower
  • 550
  • 1
  • 4
  • 13