Problème de compilation avec python 2.7 - erreur https (problème SSL ?)

Bonjour,

Je suis sous debian 8.

J’ai essayé d’installer : python-telegram-bot (https://github.com/python-telegram-bot/python-telegram-bot) mais quand je lance la commande “python setup.py install” j’ai une erreur :

Installed /usr/local/lib/python2.7/site-packages/python_telegram_bot-5.3.1-py2.7.egg Processing dependencies for python-telegram-bot==5.3.1 Searching for certifi Reading https://pypi.python.org/simple/certifi/ Download error on https://pypi.python.org/simple/certifi/: unknown url type: https -- Some packages may not be found!

J’ai donc essayé d’installer de nouveau python 2.7.13 avec open-ssl :

apt-get install opensll apt-get install libssl-dev

Et j’ai édité le fichier /Modules/setup.dist :

[code]

Socket module helper for socket(2)

_socket socketmodule.c timemodule.c

Socket module helper for SSL support; you must comment out the other

socket line above, and possibly edit the SSL variable: SSL=/usr/local/ssl

_ssl _ssl.c
-DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl
-L$(SSL)/lib -lssl -lcrypto[/code]

Ensuite, j’ai lancé ./configure and make && make install

J’ai eu des erreurs pendant l’installation :

Makefile:1081: recipe for target 'libinstall' failed make: *** [libinstall] Error 1

Et python-telegram-bot ne compile toujours pas …

Quelqu’un a-t-il une idée ?

Je vous remercie par avance !

Je connais pas trop la commande groupée ; ce qu’il faut, c’est que cela se bloque à la première erreur ; d’abord le ./configure seul, et ensuite tu inspectes un peu les résultats affichés ; ensuite seulement le make, toujours seul : comme cela on verra si l’erreur se produit au moment du ./configure ou du make, cela permettra d’avancer.

Bonjour, merci pour la réponse.

L’erreur se produit après le make install…

Faut essayer de mettre la main dessus : si on peut la lire c’est bien, sinon il reste toujours la ressource de faire le make install en redirigeant la sortie dans un fichier, qu’ensuite on peut lire.

Bonjour,

J’ai essayé de mettre mes logs mais je ne peux pas car il y a trop de caractères ; Je ne peux pas non plus poster de fichiers joints car je n’ai pas le droit (trop nouveau)… Et je ne peux pas placer plus de deux liens donc je fais 2 messages …

Je mets donc un pastbin : (rappel : j’ai édité mon fichier /Module/setup.dist pour activer le SSL).

Merci encore pour votre aide !

J’ai un problème pour install pip et je pense que cela vient de là : Lorsque je fais

sudo apt-get purge python-pip

wget https://bootstrap.pypa.io/get-pip.py

python get-pip.py

J’ai cette erreur :

 Exception:
Traceback (most recent call last):
  File "/tmp/tmpU4qizo/pip.zip/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/tmp/tmpU4qizo/pip.zip/pip/commands/install.py", line 272, in run
    with self._build_session(options) as session:
  File "/tmp/tmpU4qizo/pip.zip/pip/basecommand.py", line 72, in _build_session
    insecure_hosts=options.trusted_hosts,
  File "/tmp/tmpU4qizo/pip.zip/pip/download.py", line 329, in __init__
    self.headers["User-Agent"] = user_agent()
  File "/tmp/tmpU4qizo/pip.zip/pip/download.py", line 93, in user_agent
    from pip._vendor import distro
  File "/tmp/tmpU4qizo/pip.zip/pip/_vendor/distro.py", line 1050, in <module>
  File "/tmp/tmpU4qizo/pip.zip/pip/_vendor/distro.py", line 594, in __init__
  File "/tmp/tmpU4qizo/pip.zip/pip/_vendor/distro.py", line 933, in _get_lsb_release_info
CalledProcessError: Command 'lsb_release -a' returned non-zero exit status 1

qui semble venir de lsb_release ??

Ca fait du taf à regarder…

Dans l’immédiat je crois qu’il faudrait que tu essaies de désinstaller le plus proprement possible le Python que tu compiles et que tu installes dans /usr ; ce que l’on compile, il faut effectivement le mettre dans le /usr/local, et ne jamais rien installer manuellement dans le /usr qui est réservé aux paquets de la distribution, faute de quoi un jour ça va se coincer.

Et puis recompiler spécialement un Python, c’est vraiment l’ultima ratio : celui que tu as en place (de la distro, donc), finalement il n’y a que ce problème d’URL introuvable ; c’est peut-être simple à corriger…
Eventuellement en jetant un oeil au forum de Python…

salut
j’ai fait comme toi python setup.py install
ca a marché chez moi Finished processing dependencies for python-telegram-bot==5.3.1

essaie ca avant : apt-get install apt-transport-https cantor-backend-python2 dh-python flac ipython ipython-qtconsole jython libboost-mpi-python-dev libboost-mpi-python1.55-dev libboost-mpi-python1.55.0 libboost-python-dev libboost-python1.55-dev libboost-python1.55.0 libengine-pkcs11-openssl libflac++-dev:amd64 libflac++6:amd64 libflac-dev:amd64 libflac8:amd64 libgnutls-openssl27:amd64 libio-socket-ssl-perl liblwp-protocol-https-perl libnet-smtp-ssl-perl libnet-ssleay-perl libpython-dbg:amd64 libpython-dev:amd64 libpython-stdlib:amd64 libpython2.7:amd64 libpython2.7-dbg:amd64 libpython2.7-dev:amd64 libpython2.7-minimal:amd64 libpython2.7-stdlib:amd64 libpython3-dbg:amd64 libpython3-dev:amd64 libpython3-stdlib:amd64 libpython3.4:amd64 libpython3.4-dbg:amd64 libpython3.4-dev:amd64 libpython3.4-minimal:amd64 libpython3.4-stdlib:amd64 libssl-dev:amd64 libssl-doc libssl1.0.0:amd64 libwavpack1:amd64 openssl python python-apt python-apt-common python-avogadro python-bs4 python-bzrlib python-cairo python-cddb python-cerealizer python-cffi python-characteristic python-chardet python-configobj python-crypto python-cryptography python-cups python-cupshelpers python-dateutil python-dbg python-dbus python-dbus-dbg python-dbus-dev python-debian python-debianbts python-decorator python-defusedxml python-dev python-djvu python-dnspython python-docutils python-ecdsa python-editobj python-eventlet python-feedparser python-flickrapi python-gconf python-gdata python-gi python-gi-cairo python-glade2 python-gnome2 python-gobject python-gobject-2 python-gpgme python-gpod python-greenlet python-gst-1.0 python-gst0.10 python-gtk2 python-gtksourceview2 python-httplib2 python-id3 python-imaging python-jinja2 python-keyring python-launchpadlib python-lazr.restfulclient python-lazr.uri python-ldb python-libxml2 python-lxml python-markupsafe python-mate-menu python-matplotlib python-matplotlib-data python-minimal python-mlt python-mock python-musicbrainz2 python-mutagen python-mysql.connector python-ndg-httpsclient python-newt python-nose python-notify python-ntdb python-numpy python-oauth python-ogg python-opencv python-opengl python-openssl python-pam python-paramiko python-pexpect python-pgpdump python-pil:amd64 python-pil.imagetk:amd64 python-pkg-resources python-ply python-pmw python-potr python-pqueue python-psutil python-pyasn1 python-pyasn1-modules python-pyatspi python-pycparser python-pycurl python-pygame python-pygments python-pygoocanvas python-pyinotify python-pyjavaproperties python-pymtp python-pyorbit python-pyparsing python-pyqt5 python-pyside.phonon python-pyside.qtcore python-pyside.qtgui python-pyside.qtnetwork python-pysqlite2 python-pythonmagick python-pyvorbis python-qrcode python-qrtools python-qt4 python-qt4-dbg python-qt4-dbus python-qt4-dbus-dbg python-qt4-dev python-qt4-doc python-qt4-gl python-qt4-gl-dbg python-qt4-phonon python-qt4-phonon-dbg python-qt4-sql python-qt4-sql-dbg python-qt4reactor python-renderpm:amd64 python-reportbug python-reportlab python-reportlab-accel:amd64 python-requests python-roman python-rsvg python-samba python-secretstorage python-serial python-service-identity python-setuptools python-sfml python-sfml-dbg python-sfml-doc python-simplegeneric python-simplejson python-sip python-sip-dbg python-sip-dev python-six python-smbc python-soappy python-software-properties python-soya python-sphinx python-support python-talloc python-tdb python-tk python-twisted-bin python-twisted-core python-tz python-urllib3 python-utidylib python-vobject python-wadllib python-webkit python-wnck python-wstools python-wxglade python-wxgtk3.0 python-wxversion python-xapian python-xdg python-zbar python-zeitgeist python-zmq python-zope.interface python2.7 python2.7-dbg python2.7-dev python2.7-minimal python3 python3-aeidon python3-apt python3-aptdaemon python3-brlapi python3-cairo python3-chardet python3-dateutil python3-dbg python3-dbus python3-debian python3-defer python3-dev python3-djvu python3-enchant python3-gi python3-gi-cairo python3-httplib2 python3-icu python3-louis python3-matplotlib python3-minimal python3-mysql.connector python3-nose python3-numpy python3-opengl python3-pil:amd64 python3-pkg-resources python3-pyatspi python3-pyparsing python3-pyqt4 python3-pyqt4-dbg python3-pyqt4.phonon python3-pyqt4.phonon-dbg python3-pyqt4.qtopengl python3-pyqt5 python3-pyqt5.qtopengl python3-pyside.phonon python3-pyside.qtcore python3-pyside.qtgui python3-requests python3-sfml python3-sip python3-sip-dbg python3-six python3-software-properties python3-speechd python3-tk python3-tz python3-uno python3-urllib3 python3-xdg python3.4 python3.4-dbg python3.4-dev python3.4-minimal ssl-cert

Bonjour,

J’ai cette erreur maintenant : Je crois que c’est parce que je n’arrive pas a compiler python avec ssl… ??

ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/lib/python2.7/hashlib.py", line 109, in __get_openssl_constructor
    return __get_builtin_constructor(name)
  File "/usr/local/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/lib/python2.7/hashlib.py", line 109, in __get_openssl_constructor
    return __get_builtin_constructor(name)
  File "/usr/local/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha1
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/lib/python2.7/hashlib.py", line 109, in __get_openssl_constructor
    return __get_builtin_constructor(name)
  File "/usr/local/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/lib/python2.7/hashlib.py", line 109, in __get_openssl_constructor
    return __get_builtin_constructor(name)
  File "/usr/local/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/lib/python2.7/hashlib.py", line 109, in __get_openssl_constructor
    return __get_builtin_constructor(name)
  File "/usr/local/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha384
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/lib/python2.7/hashlib.py", line 109, in __get_openssl_constructor
    return __get_builtin_constructor(name)
  File "/usr/local/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha512
Traceback (most recent call last):
  File "get-pip.py", line 20061, in <module>
    main()
  File "get-pip.py", line 194, in main
    bootstrap(tmpdir=tmpdir)
  File "get-pip.py", line 82, in bootstrap
    import pip
  File "/tmp/tmpONSspS/pip.zip/pip/__init__.py", line 21, in <module>
  File "/tmp/tmpONSspS/pip.zip/pip/_vendor/requests/__init__.py", line 62, in <module>
  File "/tmp/tmpONSspS/pip.zip/pip/_vendor/requests/packages/__init__.py", line 29, in <module>