Hi Alvaro,

It looks like your Python 3 build does not have SSL support, see 
https://stackoverflow.com/questions/20688034/importerror-cannot-import-name-httpshandler-using-pip

Alan

On Mon, 15 Feb 2021, 21:55 Alvaro Fazenda, 
<[email protected]<mailto:[email protected]>> wrote:
Hi,

I need help, please, to discover how to change the python version in my 
Easybuild installation.
The current version uses Python 2.7 and works fine. The Easybuild version is 
4.3.2 (framework: 4.3.2, easyblocks: 4.3.2). I would like to use Python 3.8.
According to the official documentation 
(https://docs.easybuild.io/en/latest/Python-2-3-compatibility.html), it could 
be done by changing the environment variable EB_PYTHON. However, when I do, I 
receive the following message:

export EB_VERBOSE=1
export EB_PYTHON=python3.8
eb --version
>> Considering '/bin/python3.8'...
>> '/bin/python3.8' version: 3.8.1, which matches Python 3 version requirement 
>> (>= 3.5)
>> Selected Python command: /bin/python3.8 (/bin/python3.8)
>> /bin/python3.8 -m easybuild.main --version
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/runpy.py", line 193, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.8/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File 
"/home/eb/eb-install/software/EasyBuild/4.3.2/lib/python2.7/site-packages/easybuild/main.py",
 line 46, in <module>
    from easybuild.tools.build_log import EasyBuildError, print_error, 
print_msg, stop_logging
  File 
"/home/eb/eb-install/software/EasyBuild/4.3.2/lib/python2.7/site-packages/easybuild/tools/build_log.py",
 line 42, in <module>
    from easybuild.base import fancylogger
  File 
"/home/eb/eb-install/software/EasyBuild/4.3.2/lib/python2.7/site-packages/easybuild/base/fancylogger.py",
 line 88, in <module>
    from easybuild.tools.py2vs3 import raise_with_traceback, string_type
  File 
"/home/eb/eb-install/software/EasyBuild/4.3.2/lib/python2.7/site-packages/easybuild/tools/py2vs3/__init__.py",
 line 29, in <module>
    from easybuild.tools.py2vs3.py3 import *  # noqa
  File 
"/home/eb/eb-install/software/EasyBuild/4.3.2/lib/python2.7/site-packages/easybuild/tools/py2vs3/py3.py",
 line 45, in <module>
    from urllib.request import HTTPError, HTTPSHandler, Request, URLError, 
build_opener, urlopen  # noqa
ImportError: cannot import name 'HTTPSHandler' from 'urllib.request' 
(/usr/local/lib/python3.8/urllib/request.py)

Maybe I am missing something else to change. Could you help me, please?

Thanks in advance,

Alvaro



------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Volker Rieke
Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------

Reply via email to