Reputation: 25
I have tried following the steps on the website but they're not working for me. At least I must be doing something for them not to work.
Firstly, before the steps, the site tells me to open the command line and type python --version
. So I typed on the windows search bar 'command line'. Python (command line) came up and I went ahead and typed python --version
and I got the error
python is not defined
along with other stuff. So I decided to try the command prompt, the second option to come up when I typed 'command line' in on my windows search. It returned saying that it was not recognized as an internal or external file.
I attempted step 1, just to try my luck, on both the Python command line and the command prompt and nothing really happened. I'm not really sure what to do now.
Upvotes: 0
Views: 15369
Reputation: 11
Solution for those who got an error while installing kivy
.
Type ahead this code in your cmd
(windows) or terminal
(Linux/mac) and it's done:
python -m pip install kivy==2.0.0rc1
Upvotes: 1
Reputation: 137
MD Jalals method works perfectly for me. Now kivy runs in SublimeText 3 with a 32 bit python 3.8.3! There are a lot of messages in the terminal window when running. I created a new project with sublime and saved the file main.py, listed below (from tech with Tim on YouTube, https://www.youtube.com/watch?v=bMHK6NDVlCM
After installing like MD Jalal says, and changing python interpreter in pycharm/jetbrains to python 3.8.3 32 bit, everything works there too. Anaconda's python 3.8, 3.7 does not work, python 3.8.3 64 bit also does not work.
Tim's simple window with label:
# Import kyvi app and label, from uix
from kivy.app import App
from kivy.uix.label import Label
class MyApp(App):
def build(self):
return Label(text='Tech with Tim')
if __name__=="__main__":
MyApp().run()
Thanks to MD Jalal and Tim on the Tube!
To king charles' remark: It is true that if You have both the 64 bit and the 32 bit python installed, py is the 64 bit and python is the 32 bit, at least if You install the 64 bit version first. I have not tried to install with py -m pip install for MD Jalal's description, just python -m pip install. And when using the 32 bit interpreter for python, kivy works in SublimeText as well as in PyCharm.
Upvotes: 1
Reputation: 25
Solution to the installation problem is that kivy doesn't compatible to python 3.8.X. So you need python 2.7.X to 3.7.X to run kivy. And then all the general installation process like for windows, type the followings serially in the command prompt :
python -m pip install --upgrade pip wheel setuptools
python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew
python -m pip install kivy.deps.gstreamer
python -m pip install kivy.deps.angle
python -m pip install pygame (Note: Optional)
python -m pip install kivy
python -m pip install kivy_examples (Note: Optional)
And everything will work just fine. Happy Coding
Upvotes: 3
Reputation: 11
i have encountered a simillar setback while trying to install kivy on python. in python version 3, py is used instead of python for launching python in the command prompt i.e py (to launch python3) py -m pip install kivy (to install kivy)
N.b: before installing kivy it is recommended to install cython and other python dependencies using py -m pip install cython
Upvotes: 1
Reputation: 12189
Try KivyInstaller, it'll do everything for you :)
command line is cmd.exe
which you can call with shortcut Win+R
and typing cmd or shift
+rightclick in your python installation for example and there you'll see something with "prompt"
Kivy is a framework for python, that means you need Python, which you probably didn't have and when you typed python --version
to... most probably cmd.exe
, because "python is not defined"
Upvotes: 3