La librairie kivy pour python est une librairie qui permet de créer des applications mobiles pour android et iphone.

Ouvrir le terminal

 

nstallation

Now that python is installed, open the Command line and make sure python is available by typing python --version. Then, do the following to install.

  1. Ensure you have the latest pip and wheel:

    python -m pip install --upgrade pip wheel setuptools
    
  2. Install the dependencies (skip gstreamer (~90MB) if not needed, see Kivy’s dependencies):

    python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew
    python -m pip install kivy.deps.gstreamer --extra-index-url https://kivy.org/downloads/packages/simple/
    
  3. Install kivy:

    python -m pip install kivy
    

That’s it. You should now be able to import kivy in python.

Note

Installation sous W7, W8, W10

Pour télécharger Kivy. Vous trouverez la doc ici :
http://kivy.org/#download

Il existe des versions portables de Kivy (Python + Kivy) dans un dossier à extraire. Aujourd’hui (mai 2016) il faut installer Python avant d’installer Kivy. Voici les étapes d’après la doc en ligne :

Dans un terminal (Tapez cmd dans la recherche d’applications Windows) :

  • Allez dans le dossier où se trouve votre installation Python (C :\Python3.4) :
  1. cd C:\Python3.4
  • Vous pouvez vérifier votre installation Python :
  1. python --version
  • Installez pip et Wheel :
  1. python -m pip install --upgrade pip wheel setuptools
  • Installez des dépendences :
  1. python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew

(Gstreamer est assez lourd donc ne l’installez que si vous en avec besoin (cf doc kivy))

  • Installez Kivy :
  1. python -m pip install kivy

Vous devez maintenant avoir Kivy. Pour tester :

  • Ouvrez un éditeur (Notepad, Pyzo...)
  • Copier/coller le code suivant :
  1. import kivy
  2. kivy.require('1.0.6') # replace with your current kivy version !
  3.  
  4. from kivy.app import App
  5. from kivy.uix.label import Label
  6.  
  7. class MyApp(App):
  8.  
  9. def build(self):
  10. return Label(text='Hello world')
  11.  
  12. if __name__ == '__main__':
  13. MyApp().run()

Télécharger

  • Enregistrez sous main.py
  • Clique droit sur le fichier, "Ouvrir avec", "Python Launcher" :
JPEG - 75.7 ko
Screenshot Windows Kivy
  • Votre première application devrait se lancer :
PNG - 6.6 ko
Hello World Kivy

Si vous souhaitez packager vos applications pour Windows et WindowsPhones, je vous laisse lire la doc :

http://kivy.org/docs/guide/packaging-windows.html

 

The right way to install OpenCV 3.0.0 for python 3.4.2 windows 8.1

  1. go to http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv
  2. download opencv, numpy and scipy

for me I needed

opencv_python-3.0.0-cp34-none-win_amd64.whl

scipy‑0.16.0‑cp34‑none‑win_amd64.whl

numpy‑1.9.2+mkl‑cp34‑none‑win_amd64.whl

  1. download and install microsoft visual c++ 2010 express from http://microsoft-visual-cpp-express.soft32.com/free-download/
  2. open command prompt as administrator
  3. change directory like "cd C:\Users\me\Downloads" to where I downloaded the file
  4. copy and paste this "python -m pip install -U pip"
  5. then install the libraries copy and paste this

"pip install opencv_python-3.0.0-cp34-none-win_amd64.whl"

"pip install scipy‑0.16.0‑cp34‑none‑win_amd64.whl "

"pip install numpy‑1.9.2+mkl‑cp34‑none‑win_amd64.whl"

that is all

 

python -m pip install pyserial

En poursuivant votre navigation sur mon site, vous acceptez l’utilisation des Cookies et autres traceurs  pour réaliser des statistiques de visites et enregistrer sur votre machine vos activités pédagogiques. En savoir plus.