ARMmbed / mbed-cli

Arm Mbed Command Line Interface
https://os.mbed.com
Apache License 2.0
333 stars 176 forks source link

mbed cli autoinstall hangs with pip 19.0.1 #832

Closed JanneKiiskila closed 5 years ago

JanneKiiskila commented 5 years ago

If you upgrade pip to version 19.0.1 (latest as of today for Ubuntu 16.04 at least).

usr@ubuntu:~/mbed/mbed-cloud-client-example-internal$ pip --version
pip 19.0.1 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)

causes `mbed compile` to fail, as it it ends up in some never-ending loop inside the auto-installer.

usr@ubuntu:~/mbed/mbed-cloud-client-example-internal$ mbed compile -m K66F -t GCC_ARM --stats-depth 100 [mbed] Working path "/home/jankii01/mbed/mbed-cloud-client-example-internal" (program) [mbed] Auto-installing missing Python modules (intervaltree, mbed_cloud_sdk, icetea)... [mbed] Auto-installing missing Python modules (intervaltree, mbed_cloud_sdk, icetea)... ^C[mbed] User aborted!


(after 20 minutes or so).

Actually, it's likely all the `mbed` commands that evoke auto-install,  same happens also with `mbed deploy`.
JanneKiiskila commented 5 years ago

@neilwjackson @theotherjimmy @SenRamakri

JanneKiiskila commented 5 years ago

You can downgrade back with pip install pip==18.1, it starts to work again after that.

ciarmcom commented 5 years ago

Internal Jira reference: https://jira.arm.com/browse/MBOCUSTRIA-821

screamerbg commented 5 years ago

@JanneKiiskila I'm unable to reproduce the problem with pip 19.0.1, Mbed CLI 1.8.3 and https://github.com/ARMmbed/mbed-cloud-client-example-internal

Here's my log:

D:\1>mbed import https://github.com/ARMmbed/mbed-cloud-client-example-internal
[mbed] Working path "D:\1" (directory)
[mbed] Program path "D:\1"
[mbed] Importing program "mbed-cloud-client-example-internal" from "https://github.com/ARMmbed/mbed-cloud-client-example-internal" at latest revision in the current branch
[mbed] Adding library "mbed-cloud-client" from "https://github.com/ARMmbed/mbed-cloud-client-internal" at latest revision in the current branch
[mbed] Adding library "mbed-cloud-client\certificate-enrollment-client" from "https://github.com/ARMmbed/certificate-enrollment-client" at rev #949c358bee9c
[mbed] Adding library "mbed-cloud-client\factory-configurator-client" from "https://github.com/ARMmbed/factory-configurator-client" at rev #bca7efbc1c40
[mbed] Adding library "mbed-cloud-client\factory-configurator-client\mbed-client-esfs" from "https://github.com/ARMmbed/mbed-client-esfs" at rev #0e1429c6c919
[mbed] Adding library "mbed-cloud-client\factory-configurator-client\secsrv-cbor" from "https://github.com/ARMmbed/secsrv-cbor" at rev #37d8d135604c
[mbed] Adding library "mbed-cloud-client\mbed-client-pal" from "https://github.com/ARMmbed/mbed-client-pal" at rev #9d3ebaaefb18
[mbed] Adding library "mbed-cloud-client\mbed-client-randlib" from "https://github.com/ARMmbed/mbed-client-randlib" at rev #531457e3b095
[mbed] Adding library "mbed-cloud-client\mbed-coap" from "https://github.com/ARMmbed/mbed-coap" at rev #7cc17aaa5f85
[mbed] Adding library "mbed-cloud-client\mbed-trace" from "https://github.com/ARMmbed/mbed-trace" at rev #6d3590f08853
[mbed] Adding library "mbed-cloud-client\nanostack-libservice" from "https://github.com/ARMmbed/nanostack-libservice" at rev #a953636946a4
[mbed] Adding library "mbed-cloud-client\ns-hal-pal" from "https://github.com/ARMmbed/ns-hal-pal" at rev #df53a563e067
[mbed] Adding library "mbed-cloud-client\sal-stack-nanostack-eventloop" from "https://github.com/ARMmbed/sal-stack-nanostack-eventloop" at rev #be7cdd6bf4b1
[mbed] Adding library "mbed-cloud-client\update-client-hub" from "https://github.com/ARMmbed/update-client-hub" at rev #cdbabf8116a5
[mbed] Adding library "mbed-os" from "https://github.com/ARMmbed/mbed-os" at rev #cee814dc2971
[mbed] Adding library "pal-platform" from "https://github.com/ARMmbed/pal-platform" at rev #bc8a1d84d7bf
[mbed] Adding library "tools" from "https://github.com/ARMmbed/mbed-bootloader-binaries" at rev #6b5c757abc29
[mbed] Adding library "drivers\wifi-x-nucleo-idw01m1" from "https://github.com/ARMmbed/wifi-x-nucleo-idw01m1" at rev #a00282000178
[mbed] Adding library "source\platform" from "https://github.com/ARMmbed/mbed-cloud-client-platform-common" at rev #eb51794b3fee
[mbed] Auto-installing missing Python modules (intervaltree, mbed_cloud_sdk, icetea)...

D:\1>mbed --version
1.8.3

D:\1>pip --version
pip 19.0.1 from c:\progra~1\python\lib\site-packages\pip (python 2.7)

D:\1>python --version
Python 2.7.11

Can you provide:

JanneKiiskila commented 5 years ago

It's now some other dependency that is causing it, @anttiylitokola also has it working with 19.0.1. So, there's now some other combination that causes the issue here - downgrading pip fixed the issue for me.

jankii01@ubuntu:~/mbed/mbed-cloud-client-example-internal$ python --version
Python 2.7.12
jankii01@ubuntu:~/mbed/mbed-cloud-client-example-internal$ mbed --version
1.8.3
jankii01@ubuntu:~/mbed/mbed-cloud-client-example-internal$ pip list
Package                       Version    
----------------------------- -----------
adium-theme-ubuntu            0.3.4      
alabaster                     0.7.10     
appdirs                       1.4.3      
argcomplete                   1.9.3      
asn1ate                       0.6.0      
asn1crypto                    0.24.0     
Babel                         2.5.3      
backports-abc                 0.5        
beautifulsoup4                4.6.0      
certifi                       2018.1.18  
cffi                          1.11.4     
chardet                       3.0.4      
click                         6.7        
colorama                      0.3.9      
coloredlogs                   9.0        
cryptography                  2.2.2      
docutils                      0.14       
ecdsa                         0.13       
enum34                        1.1.6      
fasteners                     0.14.1     
flex                          6.12.0     
funcsigs                      1.0.2      
functools32                   3.2.3.post2
future                        0.16.0     
futures                       3.2.0      
fuzzywuzzy                    0.16.0     
hgapi                         1.7.4      
humanfriendly                 4.8        
idna                          2.6        
imagesize                     0.7.1      
intelhex                      2.2.1      
ipaddress                     1.0.19     
Jinja2                        2.10       
jsonmerge                     1.4.0      
jsonpointer                   1.14       
jsonschema                    2.6.0      
junit-xml                     1.8        
livereload                    2.5.1      
lockfile                      0.12.2     
Logbook                       1.1.0      
lxml                          4.1.1      
manifest-tool                 1.4.5      
Markdown                      2.6.11     
MarkupSafe                    1.0        
mbed-cli                      1.8.3      
mbed-greentea                 1.3.3      
mbed-host-tests               1.3.0      
mbed-ls                       1.3.6      
mbed-test-wrapper             1.0.0      
mercurial                     3.7.3      
mkdocs                        0.17.2     
mock                          2.0.0      
monotonic                     1.4        
pathlib                       1.0.1      
pbr                           3.1.1      
pip                           18.1       
prettytable                   0.7.2      
project-generator             0.8.16     
project-generator-definitions 0.2.35     
protobuf                      3.5.2.post1
psutil                        5.4.3      
py                            1.5.2      
pyasn1                        0.2.3      
pycparser                     2.18       
pyelftools                    0.23       
PyGithub                      1.35       
Pygments                      2.2.0      
PyJWT                         1.5.3      
pyOCD                         0.8.1a1    
pyOpenSSL                     17.5.0     
pyparsing                     2.2.0      
pyserial                      3.4        
pyshark                       0.3.7.11   
pytz                          2017.3     
pyusb                         1.0.2      
PyYAML                        3.12       
requests                      2.18.4     
rfc3987                       1.3.7      
semantic-version              2.6.0      
semver                        2.7.9      
setuptools                    38.4.0     
singledispatch                3.4.0.3    
six                           1.11.0     
snowballstemmer               1.2.1      
Sphinx                        1.6.6      
sphinxcontrib-websupport      1.0.1      
strict-rfc3339                0.7        
tornado                       4.5.3      
trollius                      1.0.4      
typing                        3.6.4      
unity-lens-photos             1.0        
urllib3                       1.22       
validate-email                1.3        
valinor                       0.0.15     
websocket-client              0.46.0     
wheel                         0.30.0     
xmltodict                     0.11.0     
yattag                        1.9.2      
You are using pip version 18.1, however version 19.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

I'm on Ubuntu 16.04 - latest patches in (updated this week).

jankii01@ubuntu:~/mbed/mbed-cloud-client-example-internal$ cat /proc/sys/kernel/version 
#46~16.04.1-Ubuntu SMP Fri Dec 7 13:31:08 UTC 2018
JanneKiiskila commented 5 years ago

I am probably also having a newer version of git: git version 2.20.1.

bridadan commented 5 years ago

@JanneKiiskila this should have been fixed with release 1.9.0 of Mbed CLI, are you still experiencing this issue?

JanneKiiskila commented 5 years ago

This can be closed now, closing it.