08-01-2018 09:14 AM
Hi All,
I'm trying to implement a python application with docker in IE 4000 but when i run the command "pip install" to install a library in the iox-app its return this error:
/ # pip install pymodbus
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==1.3.1', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/site-packages/distribute-0.6.32-py2.7.egg/pkg_resources.py", line 337, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/site-packages/distribute-0.6.32-py2.7.egg/pkg_resources.py", line 2311, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/site-packages/distribute-0.6.32-py2.7.egg/pkg_resources.py", line 2017, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/lib/python2.7/site-packages/pip/__init__.py", line 9, in <module>
from pip.log import logger
File "/usr/lib/python2.7/site-packages/pip/log.py", line 7, in <module>
from pip import backwardcompat
File "/usr/lib/python2.7/site-packages/pip/backwardcompat/__init__.py", line 67, in <module>
from urllib2 import URLError, HTTPError
File "/usr/lib/python2.7/urllib2.py", line 94, in <module>
File "/usr/lib/python2.7/httplib.py", line 79, in <module>
File "/usr/lib/python2.7/mimetools.py", line 6, in <module>
File "/usr/lib/python2.7/tempfile.py", line 34, in <module>
File "/usr/lib/python2.7/random.py", line 61, in <module>
ValueError: math domain error
I used this cisco docker image for IE 4000:
devhub-docker.cisco.com/iox-docker/ie4k/base-rootfs:latest
are there any limitations concerning the implementation of pytohn on IE 4000 with this image?
is there another way to install python library on IE 4000?
Best Regards
Giovanni Sirigu
08-02-2018 06:13 PM
08-03-2018 01:07 AM
Hi,
I've already tried to install the python package with the Dockerfile but docker return the same error and the container is not created.
This is the error returned
Step 4/7 : RUN pip install pymodbus
---> Running in 7de2d19e88f0
Invalid instruction
**bleep** 0f76b494 LR 0f76b8c8 CTR 0fc87674 XER 0000000c CPU#0
MSR 00006000 HID0 00000000 HF 00006000 iidx 0 didx 0
TB 00000154 665200896433
GPR00 000000000f76b870 00000000f6feaf50 00000000f68024c0 0000000000000000
GPR04 0000000000000000 000000000f8f25d4 0000000000000008 00000000f6feb1a8
GPR08 0000000000000000 0000000000000000 0000000000000000 000000000fc87674
GPR12 0000000000000000 0000000010018a10 00000000f666cf08 0000000000000000
GPR16 00000000f668e690 000000001011cf10 000000000ffa60f8 000000001011cba0
GPR20 000000001011d04c 000000000ffa60f8 0000000000000000 00000000f6feb1a8
GPR24 00000000000000a4 00000000f6687a50 0000000000000029 0000000010057108
GPR28 00000000f6feaf58 000000000f8f2664 000000000f8f02e8 000000000f8f2410
CR 22228442 [ E E E E L G G E ] RES ffffffff
FPR00 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR04 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR08 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR12 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR16 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR20 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR24 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR28 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPSCR 00000000
Invalid instruction
**bleep** 0f76b4b4 LR 0f76b890 CTR 0fc87674 XER 0000000c CPU#0
MSR 00006000 HID0 00000000 HF 00006000 iidx 0 didx 0
TB 00000154 665202939899
GPR00 000000000f76b884 00000000f6feaf50 00000000f68024c0 0000000000000000
GPR04 0000000000000000 000000000f8f25d4 0000000000000008 00000000f6feb1a8
GPR08 0000000000000000 0000000000000000 0000000000000000 000000000fc87674
GPR12 0000000000000000 0000000010018a10 00000000f666cf08 0000000000000000
GPR16 00000000f668e690 000000001011cf10 000000000ffa60f8 000000001011cba0
GPR20 000000001011d04c 000000000ffa60f8 0000000000000000 00000000f6feb1a8
GPR24 00000000000000a4 00000000f6687a50 0000000000000029 0000000010057108
GPR28 00000000f6feaf58 000000000f8f2664 000000000f8f02e8 000000000f8f2410
CR 22228442 [ E E E E L G G E ] RES ffffffff
FPR00 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR04 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR08 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR12 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR16 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR20 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR24 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR28 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPSCR 00000000
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==1.3.1', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/site-packages/distribute-0.6.32-py2.7.egg/pkg_resources.py", line 337, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/site-packages/distribute-0.6.32-py2.7.egg/pkg_resources.py", line 2311, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/site-packages/distribute-0.6.32-py2.7.egg/pkg_resources.py", line 2017, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/lib/python2.7/site-packages/pip/__init__.py", line 9, in <module>
from pip.log import logger
File "/usr/lib/python2.7/site-packages/pip/log.py", line 7, in <module>
from pip import backwardcompat
File "/usr/lib/python2.7/site-packages/pip/backwardcompat/__init__.py", line 67, in <module>
from urllib2 import URLError, HTTPError
File "/usr/lib/python2.7/urllib2.py", line 94, in <module>
File "/usr/lib/python2.7/httplib.py", line 79, in <module>
File "/usr/lib/python2.7/mimetools.py", line 6, in <module>
File "/usr/lib/python2.7/tempfile.py", line 34, in <module>
File "/usr/lib/python2.7/random.py", line 61, in <module>
ValueError: math domain error
The command '/bin/sh -c pip install pymodbus' returned a non-zero code: 1
And this is the Dockerfile
FROM devhub-docker.cisco.com/iox-docker/ie4k/base-rootfs:latest
RUN opkg update && opkg install python
RUN opkg install python-pip
RUN pip install pymodbus
COPY poll-temperature.py /usr/bin/poll-temperature.py
RUN chmod 777 /usr/bin/poll-temperature.py
CMD /usr/bin/poll-temperature.py
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide