Problem installing the odrive python tool

I’m getting this error when typing ‘pip install odrive’

Collecting odrive
  Downloading https://files.pythonhosted.org/packages/ca/e5/7f8fadbd57fa73c27cf0362aaf8d60f544a277cc48509381604450a7af71/odrive-0.4.1.tar.gz (41kB)
    100% |████████████████████████████████| 51kB 1.6MB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-RbkW7K/odrive/setup.py", line 87, in <module>
        import odrive.utils
      File "odrive/utils.py", line 169
        print(question, end='')
                           ^
    SyntaxError: invalid syntax
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-RbkW7K/odrive/

Does anyone know how to solve this?

I’m using Ubuntu btw

thanks

This means your pip is targeting python2, you need to target python3.

Thanks but how should I do that?

use command pip3 instead of pip.

1 Like

This worked, thanks a lot!

1 Like

I am having the same issue with both pip and pip3.