module pillow (PIL) Python3 [Réglé]

Erik Membre non connecté
-
- Voir le profil du membre Erik
- Inscrit le : 27/05/2014
- Groupes :
Reprise du message précédent
OK Merci pour la réponse.Je reprends donc la méthode d'installation du site (et j'ai enlevé les accents du dossier téléchargement) . Voilà le résultat.
>>> conda install pillow
Package plan for installation in environment /home/edesrues/Telechargements/pyzo2013c:
The following packages will be downloaded:
package | build
---------------------------|-----------------
conda-3.7.3 | py33_0 160 KB
jpeg-8d | 0 699 KB
libtiff-4.0.2 | 1 931 KB
openssl-1.0.1h | 1 2.5 MB
pillow-2.5.1 | py33_0 721 KB
pycosat-0.6.1 | py33_0 152 KB
python-3.3.5 | 3 19.7 MB
pyyaml-3.11 | py33_0 336 KB
readline-6.2 | 2 606 KB
requests-2.4.3 | py33_0 575 KB
sqlite-3.8.4.1 | 0 2.0 MB
tk-8.5.15 | 0 1.8 MB
xz-5.0.5 | 0 505 KB
The following packages will be UN-linked:
package | build
---------------------------|-----------------
conda-2.0.2 | py33_0
openssl-1.0.1c | 0
pycosat-0.6.0 | py33_0
python-3.3.2 | 1
pyyaml-3.10 | py33_0
readline-6.2 | 0
requests-1.2.3 | py33_0
sqlite-3.7.13 | 0
tk-8.5.13 | 0
The following packages will be linked:
package | build
---------------------------|-----------------
conda-3.7.3 | py33_0 hard-link
jpeg-8d | 0 hard-link
libtiff-4.0.2 | 1 hard-link
openssl-1.0.1h | 1 hard-link
pillow-2.5.1 | py33_0 hard-link
pycosat-0.6.1 | py33_0 hard-link
python-3.3.5 | 3 hard-link
pyyaml-3.11 | py33_0 hard-link
readline-6.2 | 2 hard-link
requests-2.4.3 | py33_0 hard-link
sqlite-3.8.4.1 | 0 hard-link
tk-8.5.15 | 0 hard-link
xz-5.0.5 | 0 hard-link
Error: Missing write permissions in: /home/edesrues/Telechargements/pyzo2013c
#
# You don't appear to have the necessary permissions to install packages
# into the install area '/home/edesrues/Telechargements/pyzo2013c'.
# However you can clone this environment into your home directory and
# then make changes to it.
# This may be done using the command:
#
# $ conda create -n my_root --clone=/home/edesrues/Telechargements/pyzo2013c
>>>
J'ai bien noté également que (je vous cite):
" il serait bon de vérifier les permissions (lecture/écriture) du dossier ~/Téléchargements/pyzo2013c."
J'ai besoin d'un coup de main pour ça...
Erik
Erik

bbo_ Membre non connecté
-
- Voir le profil du membre bbo_
- Inscrit le : 09/09/2013
- Site internet
- Groupes :
Code CONSOLE :
ls -l ~/Téléchargements/pyzo2013c
Le paragraphe 3.2 de cette page du site linux-france t'explique à quoi correspond la réponse à la commande.
Si tu dois modifier les droits d'écriture pour "other" (les autres que toi ou que les membres du groupe d'utilisateurs), tu pourras faire
Code CONSOLE :
chmod o+w -R ~/Téléchargements/pyzo2013c
Édité par bbo_ Le 25/11/2014 à 12h56

Erik Membre non connecté
-
- Voir le profil du membre Erik
- Inscrit le : 27/05/2014
- Groupes :

Voilà
[root@ordi ~]# ls -l /home/edesrues/Telechargements/pyzo2013c
total 16644
drwxr-xr-x 2 root root 4096 mai 1 2014 bin/
drwxr-xr-x 2 root root 4096 mai 1 2014 conda-meta/
-rwxr--r-x 1 1000 1000 1687949 nov. 3 2013 IEP*
drwxr-xr-x 10 root root 4096 mai 1 2014 include/
-rwxr--r-x 1 1000 1000 1687918 nov. 3 2013 ipython_notebook*
-rwxr--r-x 1 1000 1000 1687913 nov. 3 2013 ipython_qtconsole*
drwxr-xr-x 9 root root 4096 mai 1 2014 lib/
-rw-r--r-- 1 1000 1000 615136 nov. 3 2013 libm.so.6
-rw-r--r-- 1 1000 1000 7909183 nov. 3 2013 libpython3.3m.so.1.0
drwxr-xr-x 2 root root 4096 mai 1 2014 pkgs/
-rwxr-xr-x 1 1000 1000 23804 nov. 3 2013 python*
-rwxr--r-x 1 1000 1000 1688681 nov. 3 2013 pyzo*
-rwxr--r-x 1 1000 1000 1688692 nov. 3 2013 pyzo_activate*
-rw-r--r-- 1 1000 1000 771 nov. 3 2013 qt.conf
drwxr-xr-x 2 root root 4096 mai 1 2014 _settings/
drwxr-xr-x 7 root root 4096 mai 1 2014 share/
Si j'ai bien compris, il me semble que j'ai bien les droits requis (rwx) sur les fichiers concernés (je suis le seul utilisateur de toutes façons), mais du coup, je ne comprends pas le message:
Error: Missing write permissions in: /home/edesrues/Telechargements/pyzo2013c
#
# You don't appear to have the necessary permissions to install packages
# into the install area '/home/edesrues/Telechargements/pyzo2013c'.
Erik

Akien Membre non connecté
-
- Voir le profil du membre Akien
- Inscrit le : 12/06/2011
- Groupes :
-
Équipe Mageia
Pour corriger ça, logue toi en root dans un terminal, puis :
Code SHELL :
chown -R edesrues:edesrues /home/edesrues/Telechargements/pyzo2013c

Erik Membre non connecté
-
- Voir le profil du membre Erik
- Inscrit le : 27/05/2014
- Groupes :


Erik
Erik

Erik Membre non connecté
-
- Voir le profil du membre Erik
- Inscrit le : 27/05/2014
- Groupes :
J'ai un pb pour charger le module opencv de python.
J'ai d'abord importé le paquetage python-opencv par le CCM, mais dans python (j'utilise pyzo), " import cv2" échoue.
J'ai aussi tenté la commande " conda import opencv " dans python avec pour résultat le message ci-dessous:
conda install opencv
Fetching package metadata: ...
Solving package specifications: ..
Error: Unsatisfiable package specifications.
Generating hint:
| | 0%
[1/1 ] |#################################################| 100%
[1/1 ] | | 0%
[1/3 ] |################ | 33%
[2/3 ] |################################ | 66%
[3/3 ] |#################################################| 100%
[ COMPLETE ] |#################################################| 100%
Hint: the following combinations of packages create a conflict with the
remaining packages:
- python 3.3*
- opencv
Merci d 'avance pour votre aide
Erik
Erik

Erik Membre non connecté
-
- Voir le profil du membre Erik
- Inscrit le : 27/05/2014
- Groupes :
Il semble que opencv ne fonctionne qu'avec python 2.7 (pas avec python 3 en tous cas). Si c'est bien ça, alors mon message précédent n'a plus lieu d'être....
Erik
Erik

Dimitrios Membre non connecté
-
- Voir le profil du membre Dimitrios
- Inscrit le : 24/02/2008
- Site internet
- Groupes :
Erik :
Voilà le début du programme
# On travaille avec PIL et numpy
from PIL import Image
from numpy import *
Et le message d'erreur en retour
from PIL import Image
ImportError: No module named 'PIL'
(même chose en mettant pillow à la place de PIL)
pourtant, dans les paquetages, python3-pillow est bien coché...
# On travaille avec PIL et numpy
from PIL import Image
from numpy import *
Et le message d'erreur en retour
from PIL import Image
ImportError: No module named 'PIL'
(même chose en mettant pillow à la place de PIL)
pourtant, dans les paquetages, python3-pillow est bien coché...
Tu peux utiliser :
try:
import Image # python3
except ImportError:
from PIL import Image # python2

Erik Membre non connecté
-
- Voir le profil du membre Erik
- Inscrit le : 27/05/2014
- Groupes :
J'ai eu tort de reprendre cette discussion pour un nouveau problème (obtenir opencv avec python3)
Erik
Erik
Répondre
Vous n'êtes pas autorisé à écrire dans cette catégorie