probleme d'install sous windows

parisse
Messages : 5731
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

probleme d'install sous windows

Message par parisse » ven. nov. 18, 2022 7:40 am

Salut Frédéric,

Je viens d'essayer une install sur un Windows 11, avec Python 3.10 qui s'installe quand on tape python depuis l'invite de commande windows. Et ca plante avec l'erreur suivante:

Code : Tout sélectionner

 python -mpip install giacpy
Collecting giacpy
  Downloading giacpy-0.7.0.tar.gz (456 kB)
     ---------------------------------------- 457.0/457.0 kB 9.5 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [7 lines of output]
      running egg_info
      creating C:\Users\paris\AppData\Local\Temp\pip-pip-egg-info-gykkbzrk\giacpy.egg-info
      writing C:\Users\paris\AppData\Local\Temp\pip-pip-egg-info-gykkbzrk\giacpy.egg-info\PKG-INFO
      writing dependency_links to C:\Users\paris\AppData\Local\Temp\pip-pip-egg-info-gykkbzrk\giacpy.egg-info\dependency_links.txt
      writing top-level names to C:\Users\paris\AppData\Local\Temp\pip-pip-egg-info-gykkbzrk\giacpy.egg-info\top_level.txt
      writing manifest file 'C:\Users\paris\AppData\Local\Temp\pip-pip-egg-info-gykkbzrk\giacpy.egg-info\SOURCES.txt'
      error: package directory 'win64' does not exist
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
PS C:\Users\paris> python
Python 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:50:30) [MSC v.1933 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from giacpy import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'giacpy'
>>> quit()

frederic han
Messages : 1137
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

Re: probleme d'install sous windows

Message par frederic han » ven. nov. 18, 2022 5:50 pm

oui c'etait normal, je n'avais pas mis de binaires windows pour python >3.8
sans binaires pip telecharge les sources et essaie de les compiler et ca n'est pas si simple sous windows.
Je viens de mettre une 0.7.1 que j'avais preparé il y a 15j avec des binaires pour python 3.9, 3.10 et 3.11. Mais c'est la premiere fois que j'utilise tes .dll qui dependent de fltk et autre, donc à voir s'il n'en manque pas.
Fred

ddorange
Messages : 55
Inscription : sam. mars 12, 2016 7:50 am

Re: probleme d'install sous windows

Message par ddorange » sam. nov. 26, 2022 4:13 pm

Bonjour,
Merci pour la mise à jour.

Thonny n'arrive pas à mettre à jour sous Window :
Capture1.png
Capture1.png (10.17 Kio) Consulté 5167 fois

Installation impossible sous Ubuntu 22.04
Capture3.png
Capture3.png (13.44 Kio) Consulté 5170 fois

Je ne comprends pas pourquoi l'image apparaît deux fois ... Un bug ....
Cordialement.
Pièces jointes
Capture3.png
Capture3.png (13.44 Kio) Consulté 5167 fois
Didier DP
www.dmaths.org

ddorange
Messages : 55
Inscription : sam. mars 12, 2016 7:50 am

Re: probleme d'install sous windows

Message par ddorange » dim. nov. 27, 2022 9:28 am

Bonjour,
C'est peut-être mieux si je donne le log d'erreurs.
Ubuntu 20.04
/usr/bin/python3 -m pip install --no-cache-dir --user giacpy --disable-pip-version-check

Collecting giacpy
Downloading giacpy-0.7.1.tar.gz (601 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 601.4/601.4 KB 4.9 MB/s eta 0:00:00
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: giacpy
Building wheel for giacpy (setup.py): started
Building wheel for giacpy (setup.py): finished with status 'error'
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.10
creating build/lib.linux-x86_64-3.10/giacpy
copying giacpy/__init__.py -> build/lib.linux-x86_64-3.10/giacpy
copying giacpy/GPL-2 -> build/lib.linux-x86_64-3.10/giacpy
copying giacpy/giacpymisc.h -> build/lib.linux-x86_64-3.10/giacpy
copying giacpy/giacpy.pxd -> build/lib.linux-x86_64-3.10/giacpy
running build_ext
building 'giacpy.giacpy' extension
creating build/temp.linux-x86_64-3.10
creating build/temp.linux-x86_64-3.10/giacpy
x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.10 -c giacpy/giacpy.cpp -o build/temp.linux-x86_64-3.10/giacpy/giacpy.o
giacpy/giacpy.cpp:723:10: fatal error: giac/giac.h: Aucun fichier ou dossier de ce type
723 | #include "giac/giac.h"
| ^~~~~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for giacpy
Running setup.py clean for giacpy
Failed to build giacpy
Installing collected packages: giacpy
Running setup.py install for giacpy: started
Running setup.py install for giacpy: finished with status 'error'
error: subprocess-exited-with-error

× Running setup.py install for giacpy did not run successfully.
│ exit code: 1
╰─> [22 lines of output]
running install
/usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.10
creating build/lib.linux-x86_64-3.10/giacpy
copying giacpy/__init__.py -> build/lib.linux-x86_64-3.10/giacpy
copying giacpy/GPL-2 -> build/lib.linux-x86_64-3.10/giacpy
copying giacpy/giacpymisc.h -> build/lib.linux-x86_64-3.10/giacpy
copying giacpy/giacpy.pxd -> build/lib.linux-x86_64-3.10/giacpy
running build_ext
building 'giacpy.giacpy' extension
creating build/temp.linux-x86_64-3.10
creating build/temp.linux-x86_64-3.10/giacpy
x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.10 -c giacpy/giacpy.cpp -o build/temp.linux-x86_64-3.10/giacpy/giacpy.o
giacpy/giacpy.cpp:723:10: fatal error: giac/giac.h: Aucun fichier ou dossier de ce type
723 | #include "giac/giac.h"
| ^~~~~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> giacpy

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Process returned with code 1
Didier DP
www.dmaths.org

frederic han
Messages : 1137
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

Re: probleme d'install sous windows

Message par frederic han » dim. nov. 27, 2022 11:42 pm

Attention,
pour windows il faut faire un binaire pour chaque sous version de python3. Je n'avais pas déposé de binaire pour python 3.7 ni 3.8, je viens de le faire, mais sinon une solution aurait ete de mettre à jour votre python.
Il me semble que votre tony utilise python 3.7. du coup maintenant cela devrait marcher.

Pour ubuntu, sur pypi il n'y a que des sources, dans ce cas il essaie de compiler giacpy.
Vous avez alors besoin des headers de giac et de gmp (et de votre version de python) pour pouvoir compiler giacpy.
Souvent les paquets s'appelent XXX-dev ou -devel

Frederic

ddorange
Messages : 55
Inscription : sam. mars 12, 2016 7:50 am

Re: probleme d'install sous windows

Message par ddorange » lun. nov. 28, 2022 12:40 pm

Bonjour,
En fait le log était celui de Linux.
Pour Windows, mise à jour toujours refusée.
Il s'agit de Thonny 3.3
La version de Python est 3.7.9
Voici le log :
C:\Users\didier\AppData\Local\Programs\Thonny\python.exe -m pip install --no-cache-dir --user --upgrade giacpy --disable-pip-version-check
Collecting giacpy
Downloading giacpy-0.7.1.tar.gz (601 kB)
ERROR: Command errored out with exit status 1:
command: 'C:\Users\didier\AppData\Local\Programs\Thonny\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\didier\\AppData\\Local\\Temp\\pip-install-is96yj8y\\giacpy\\setup.py'"'"'; __file__='"'"'C:\\Users\\didier\\AppData\\Local\\Temp\\pip-install-is96yj8y\\giacpy\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\didier\AppData\Local\Temp\pip-pip-egg-info-aj2n_3em'
cwd: C:\Users\didier\AppData\Local\Temp\pip-install-is96yj8y\giacpy\
Complete output (7 lines):
running egg_info
creating C:\Users\didier\AppData\Local\Temp\pip-pip-egg-info-aj2n_3em\giacpy.egg-info
writing C:\Users\didier\AppData\Local\Temp\pip-pip-egg-info-aj2n_3em\giacpy.egg-info\PKG-INFO
writing dependency_links to C:\Users\didier\AppData\Local\Temp\pip-pip-egg-info-aj2n_3em\giacpy.egg-info\dependency_links.txt
writing top-level names to C:\Users\didier\AppData\Local\Temp\pip-pip-egg-info-aj2n_3em\giacpy.egg-info\top_level.txt
writing manifest file 'C:\Users\didier\AppData\Local\Temp\pip-pip-egg-info-aj2n_3em\giacpy.egg-info\SOURCES.txt'
error: package directory 'win32' does not exist
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Error: process returned with code 1
Didier DP
www.dmaths.org

frederic han
Messages : 1137
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

Re: probleme d'install sous windows

Message par frederic han » mar. nov. 29, 2022 1:54 pm

Ha! je n'avais pas vu que vous aviez un python 32bit. (Python3.7)
Donc la c'est normal pour windows 32bits je n'ai mis aucun binaires 0.7.1 (dans ce cas rester avec la 0.7.0)

Le message d'erreur est normal, sans binaire il telecharge les sources et essaie de le compiler, mais meme avec toutes les dépendances cela n'est pas si simple sous windows.

Frederic

ddorange
Messages : 55
Inscription : sam. mars 12, 2016 7:50 am

Re: probleme d'install sous windows

Message par ddorange » mer. nov. 30, 2022 5:58 pm

Bonsoir,

J'ai essayé sous Windows avec une version 64 bits.
J'ai un message indiquant une installation réussie mais giacpy est introuvable.
Capture d’écran 2022-11-30 184358.png
Capture d’écran 2022-11-30 184358.png (58.02 Kio) Consulté 5102 fois
Capture d’écran 2022-11-30 184440.png
Capture d’écran 2022-11-30 184440.png (10.41 Kio) Consulté 5102 fois

Après je me suis aperçu que les dossiers giacpy ne sont pas dans le path.
Je les déplace et j'obtiens :

Capture d’écran 2022-11-30 185531.png
Capture d’écran 2022-11-30 185531.png (11.88 Kio) Consulté 5102 fois
Enfin j'ai ajouté le dossier contenant giacpy dans le path et là cela fonctionne.
J'ai vérifié avec Sympy même problème.
Ce n'est donc pas l'installation de giacpy qui pose problème mais Thonny ...
Désolé pour le bruit.

Donc résolu pour Windows.

Cordialement.
Didier DP
www.dmaths.org

Répondre