错误"[[Core]选项-无法识别模式""错误;在PyCharm上导入Kivy [英] Error "[Core ] option --mode not recognized" importing Kivy on PyCharm

查看:278
本文介绍了错误"[[Core]选项-无法识别模式""错误;在PyCharm上导入Kivy的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将kivy导入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

使用Pycharm外部的同一个解释器,一切正常.

While everything works fine using the same interpreter outside Pycharm.

我在PyCharm中使用的解释器是"C:\ Users \ MyName \ PycharmProjects \ Convert_py_for_android \ venv \ Scripts \ python.exe".如果我在同一位置打开python.exe并导入kivy,一切正常.

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.

推荐答案

我有Windows 10,Python 3.7.2 64位和PyCharm 2018.3.7社区版

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

此视频显示了您需要执行的操作: https://www.youtube.com/watch?v=DHks4jfyLLk

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

音频是葡萄牙语,但是pycharm是英语,因此您可以按照全屏模式观看,以按照步骤操作.他遵循的路径是:

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:

文件->设置->项目:ProjectName->项目解释器->单击滚轮->单击添加.->在左侧,单击系统解释器->单击右侧的三个点框解释器"路径框的一侧->单击眼睛"按钮,以显示隐藏的文件->查找您的python路径(在我的情况下为c:\ users \您的名字\ appdata \ local \ programs \ python \ python37 \ pythonw .exe)->单击pythonw.exe文件->单击确定->确定->确定.

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.

基本上,系统解释器必须是pythonw.exe,而不是python.exe

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

这篇关于错误"[[Core]选项-无法识别模式""错误;在PyCharm上导入Kivy的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆