OpenWrt Forum Archive

Topic: Python issue making image

The content of this topic has been archived on 22 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

I'm having issues compiling a new image.  I'm running Ubuntu 16.04.  I fixed a few deps I had earlier with python, but this doesnt seem to be one:

File "/home/ubuntu/.local/lib/python2.7/site-packages/urllib3/__init__.py", line 8, in <module>
    from .connectionpool import (
  File "/home/ubuntu/.local/lib/python2.7/site-packages/urllib3/connectionpool.py", line 29, in <module>
    from .connection import (
  File "/home/ubuntu/.local/lib/python2.7/site-packages/urllib3/connection.py", line 39, in <module>
    from .util.ssl_ import (
  File "/home/ubuntu/.local/lib/python2.7/site-packages/urllib3/util/__init__.py", line 6, in <module>
    from .ssl_ import (
  File "/home/ubuntu/.local/lib/python2.7/site-packages/urllib3/util/ssl_.py", line 7, in <module>
    from hashlib import md5, sha1, sha256
ImportError: cannot import name sha256

However the package seem to be there:

/opt/qoya-build/openwrt$ python 
Python 2.7.12 (default, Nov 19 2016, 06:48:10) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from hashlib import md5, sha1, sha256
>>> quit()

/opt/qoya-build/openwrt$ python3
Python 3.5.2 (default, Sep 14 2017, 22:51:06) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from hashlib import md5, sha1, sha256
>>> 

What am I missing?  Thanks for the help.

CB

(Last edited by sloppyTypist on 12 Nov 2017, 03:45)

I tried using Ubuntu 14, no issues.  I'll stick with that for now.

The discussion might have continued from here.