Bienvenue sur IndexError.

Ici vous pouvez poser des questions sur Python et le Framework Django.

Mais aussi sur les technos front comme React, Angular, Typescript et Javascript en général.

Consultez la FAQ pour améliorer vos chances d'avoir des réponses à vos questions.

la galere pour installer wxPython

0 votes

sur Mint 19 j'obtiens :

sudo pip3 install wxPython

The directory '/home/moi/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/moi/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: wxPython in /usr/local/lib/python3.6/dist-packages (4.0.4)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from wxPython) (1.11.0)
Requirement already satisfied: Pillow in /usr/lib/python3/dist-packages (from wxPython) (5.1.0)

et quand je lance un petit script ou j importe wxPython:

Traceback (most recent call last):
  File "monscript.py", line 9, in <module>
    import wx
  File "/usr/local/lib/python3.6/dist-packages/wx/__init__.py", line 17, in <module>
    from wx.core import *
  File "/usr/local/lib/python3.6/dist-packages/wx/core.py", line 12, in <module>
    from ._core import *
ImportError: libpng12.so.0: cannot open shared object file: No such file or directory

en parcourant les forums j'essaye ceci:
sudo wget -q -O /tmp/libpng12.deb https://packages.ubuntu.com/xenial/amd64/libpng12-0/download && sudo dpkg -i /tmp/libpng12.deb && rm /tmp/libpng12.deb

j'obtiens:

dpkg-deb: erreur: '/tmp/libpng12.deb' is not a Debian format archive
dpkg: erreur de traitement de l'archive /tmp/libpng12.deb (--install) :
 dpkg-deb --control subprocess returned error exit status 2
Des erreurs ont été rencontrées pendant l'exécution :
 /tmp/libpng12.deb
demandé 11-Fev par buffalo974 (2,758 points)

1 Réponse

0 votes
 
Meilleure réponse
wget -q -O /tmp/libpng12.deb http://mirrors.kernel.org/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_amd64.deb   && sudo dpkg -i /tmp/libpng12.deb   && rm /tmp/libpng12.deb
répondu 15-Fev par buffalo974 (2,758 points)
...