Python

Pàgina inicial

Reply to this message
Autor: Patrick Dupre
Data:  
A: guilde
Assumpte: Python
Bonjour,

J'ai recupere un code python.

Si je fais
./hdtrans.py
J'ai une erruer
  File "./hdtrans.py", line 3, in <module>
    import py3nj
ModuleNotFoundError: No module named 'py3nj'



Si je fais
python ./hdtrans.py
J'obtiens
File "./hdtrans.py", line 126
SyntaxError: Non-ASCII character '\xe2' in file ./hdtrans.py on line 126, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

Voici la ligne:
print ("F₁'=", F1p, "/2, F'=", Fp, "/2, MF'=", MFp, "/2: ",

Il semble qu'il y ait un probleme de codage.
Que dois-je faire ?


Merci.


===========================================================================
 Patrick DUPRÉ                                 | | email: pdupre@???
 Laboratoire interdisciplinaire Carnot de Bourgogne
 9 Avenue Alain Savary, BP 47870, 21078 DIJON Cedex FRANCE
 Tel: +33 (0)380395988
===========================================================================