PelionIoT / manifest-tool

A tool for creating and parsing update manifests
Apache License 2.0
11 stars 14 forks source link

manifest-tool 2.1.1 - fails to install on Ubuntu 20.04 w Python 3.8.5 (asn1ate, pyrsistent) #27

Closed JanneKiiskila closed 3 years ago

JanneKiiskila commented 3 years ago

Freshly created Ubuntu 20.04 machine with Ubuntu 3.8.5 fails to install manifest-tool 2.1.1

jankii01@ubuntu:~$ python3 -m venv ~/pelion-venv
jankii01@ubuntu:~$ source ~/pelion-venv/bin/activate
(pelion-venv) jankii01@ubuntu:~$ python --version
Python 3.8.5
(pelion-venv) jankii01@ubuntu:~$ 
(pelion-venv) jankii01@ubuntu:~$ sudo apt install git
Reading package lists... Done
Building dependency tree       
Reading state information... Done
git is already the newest version (1:2.25.1-1ubuntu3.1).
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
(pelion-venv) jankii01@ubuntu:~$ 
(pelion-venv) jankii01@ubuntu:~$ 
(pelion-venv) jankii01@ubuntu:~$ git --version
git version 2.25.1
(pelion-venv) jankii01@ubuntu:~$ pip install manifest-tool==2.1.1
Collecting manifest-tool==2.1.1
  Downloading manifest_tool-2.1.1-cp38-cp38-manylinux2014_x86_64.whl (325 kB)
     |████████████████████████████████| 325 kB 1.1 MB/s 
Collecting jsonschema<=3.2.0,>=2.6.0
  Downloading jsonschema-3.2.0-py2.py3-none-any.whl (56 kB)
     |████████████████████████████████| 56 kB 3.3 MB/s 
Collecting pyasn1<=0.4.8,==0.3.1
  Downloading pyasn1-0.3.1-py2.py3-none-any.whl (61 kB)
     |████████████████████████████████| 61 kB 1.2 MB/s 
Collecting asn1ate<=0.6.0,>=0.5
  Downloading asn1ate-0.6.0.tar.gz (24 kB)
Collecting requests<=2.25.1,>=2.20.0
  Downloading requests-2.25.1-py2.py3-none-any.whl (61 kB)
     |████████████████████████████████| 61 kB 11.4 MB/s 
Collecting PyYAML<=5.4.1,>=4.2b1
  Downloading PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl (662 kB)
     |████████████████████████████████| 662 kB 6.1 MB/s 
Collecting cryptography<=3.3.1,>=2.5
  Downloading cryptography-3.3.1-cp36-abi3-manylinux2010_x86_64.whl (2.6 MB)
     |████████████████████████████████| 2.6 MB 5.7 MB/s 
Collecting six>=1.11.0
  Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting attrs>=17.4.0
  Downloading attrs-20.3.0-py2.py3-none-any.whl (49 kB)
     |████████████████████████████████| 49 kB 8.6 MB/s 
Collecting pyrsistent>=0.14.0
  Downloading pyrsistent-0.17.3.tar.gz (106 kB)
     |████████████████████████████████| 106 kB 5.1 MB/s 
Requirement already satisfied: setuptools in ./pelion-venv/lib/python3.8/site-packages (from jsonschema<=3.2.0,>=2.6.0->manifest-tool==2.1.1) (44.0.0)
Collecting pyparsing>=2.0.0
  Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
     |████████████████████████████████| 67 kB 9.9 MB/s 
Collecting chardet<5,>=3.0.2
  Downloading chardet-4.0.0-py2.py3-none-any.whl (178 kB)
     |████████████████████████████████| 178 kB 9.0 MB/s 
Collecting urllib3<1.27,>=1.21.1
  Downloading urllib3-1.26.4-py2.py3-none-any.whl (153 kB)
     |████████████████████████████████| 153 kB 6.2 MB/s 
Collecting certifi>=2017.4.17
  Downloading certifi-2020.12.5-py2.py3-none-any.whl (147 kB)
     |████████████████████████████████| 147 kB 10.8 MB/s 
Collecting idna<3,>=2.5
  Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
     |████████████████████████████████| 58 kB 11.4 MB/s 
Collecting cffi>=1.12
  Downloading cffi-1.14.5-cp38-cp38-manylinux1_x86_64.whl (411 kB)
     |████████████████████████████████| 411 kB 8.1 MB/s 
Collecting pycparser
  Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB)
     |████████████████████████████████| 112 kB 11.7 MB/s 
Building wheels for collected packages: asn1ate, pyrsistent
  Building wheel for asn1ate (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/jankii01/pelion-venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-q4ls89jh/asn1ate/setup.py'"'"'; __file__='"'"'/tmp/pip-install-q4ls89jh/asn1ate/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-_crew3o_
       cwd: /tmp/pip-install-q4ls89jh/asn1ate/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help

  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for asn1ate
  Running setup.py clean for asn1ate
  Building wheel for pyrsistent (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/jankii01/pelion-venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-q4ls89jh/pyrsistent/setup.py'"'"'; __file__='"'"'/tmp/pip-install-q4ls89jh/pyrsistent/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-met8czmi
       cwd: /tmp/pip-install-q4ls89jh/pyrsistent/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help

  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for pyrsistent
  Running setup.py clean for pyrsistent
Failed to build asn1ate pyrsistent
Installing collected packages: six, attrs, pyrsistent, jsonschema, pyasn1, pyparsing, asn1ate, chardet, urllib3, certifi, idna, requests, PyYAML, pycparser, cffi, cryptography, manifest-tool
    Running setup.py install for pyrsistent ... done
    Running setup.py install for asn1ate ... done
Successfully installed PyYAML-5.4.1 asn1ate-0.6.0 attrs-20.3.0 certifi-2020.12.5 cffi-1.14.5 chardet-4.0.0 cryptography-3.3.1 idna-2.10 jsonschema-3.2.0 manifest-tool-2.1.1 pyasn1-0.3.1 pycparser-2.20 pyparsing-2.4.7 pyrsistent-0.17.3 requests-2.25.1 six-1.15.0 urllib3-1.26.4
JanneKiiskila commented 3 years ago

Seems there is a dependency on wheel being installed, i.e. other words: doing pip install wheel 1st makes pip install manifest-tool==2.1.1 work just fine.

I wonder if it's enough to have it in the requirements.txt OR should it be pre-installed before you start installing it? Or making it 1st on the requirements.txt?

JanneKiiskila commented 3 years ago

This might help?

https://github.com/PelionIoT/manifest-tool/pull/28

teetak01 commented 3 years ago

@moshe-shahar can you check this?

JanneKiiskila commented 3 years ago

This sort does sound like an unhandled dependency actually on asn1ate and pyrsistent - they are the ones that need wheels, not manifest tool.

Ref:

JanneKiiskila commented 3 years ago

Internal reference: IOTUC-1633

JanneKiiskila commented 3 years ago

Created issues to those repos;

moshe-shahar commented 3 years ago

All requirements were installed successfully therefore, I closing this issue.

Additional info: