Damiano Grignolio
Damiano Grignolio

Reputation: 11

Error "[Core ] option --mode not recognized" importing Kivy on PyCharm

Importing kivy on PyCharm the following error shows up:

    [INFO   ] [Logger      ] Record log in 
    C:\Users\bill5\.kivy\logs\kivy_19-08-12_47.txt
    [ERROR  ] [Core        ] option --mode not recognized

While everything works fine using the same interpreter outside Pycharm.

The interpreter I am using in PyCharm is "C:\Users\MyName\PycharmProjects\Convert_py_for_android\venv\Scripts\python.exe". If I open python.exe on the same location and I import kivy everything works fine.

Upvotes: 1

Views: 1234

Answers (2)

xiaxio
xiaxio

Reputation: 631

I have Windows 10, Python 3.7.2 64 bits, and PyCharm 2018.3.7 Community Edition

This video shows what you need to do: https://www.youtube.com/watch?v=DHks4jfyLLk

Audio is in portuguese, however pycharm on it is in english, so you can follow the steps by watching it in full screen mode. The path he follows is:

File -> Settings -> Project:ProjectName -> Project Interpreter -> click on the wheel -> click Add.. -> On the left side, click System Interpreter -> click on the three dots box, on the right side of the 'Interpreter' path box -> click on the 'eye' button, to show hidden files -> find your python path (in my case c:\users\yourname\appdata\local\programs\python\python37\pythonw.exe) -> click on the pythonw.exe file -> click Ok -> Ok -> Ok.

Basically, the system interpreter has to be pythonw.exe, instead of python.exe

Upvotes: 2

inclement
inclement

Reputation: 29488

Looks like pycharm is starting the interpreter with a --mode argument. Kivy tries to parse all the args and doesn't like that argument (this is actually a bug, Kivy should be more intelligent, but that doesn't help here). You probably want to work out why PyCharm passes this argument, and tell it not to.

Upvotes: 0

Related Questions