Re: [OpenWrt-Users] Pip command found error even though pip is installed
Hi Lars Thanks for your reply. pip has following code. root@OpenWrt:~# cat /mnt/usb/usr/bin/pip #!/usr/bin/python2.7 # EASY-INSTALL-ENTRY-SCRIPT: 'pip==1.5.6','console_scripts','pip' __requires__ = 'pip==1.5.6' import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.exit( load_entry_point('pip==1.5.6', 'console_scripts', 'pip')() ) root@OpenWrt:~# root@OpenWrt:~# ls /usr/bin/python2.7 ls: /usr/bin/python2.7: No such file or directory root@OpenWrt:~# root@OpenWrt:~# root@OpenWrt:~# which python2.7 /mnt/usb/usr/bin/python2.7 I will try to use micro python and see if it works for me. Best Regards Phani On Wed, Apr 18, 2018 at 9:51 PM, Lars Krusewrote: > Hello Phani, > > > Am Wed, 18 Apr 2018 18:14:28 -0500 > schrieb Phani Siriki : > >> root@OpenWrt:~# ldd /mnt/usb/usr/bin/pip >> -ash: /mnt/usb/usr/bin/pip: not found >> root@OpenWrt:~# ls -l /mnt/usb/usr/bin/pip >> -rwxr-xr-x1 root root 284 Sep 9 2015 /mnt/usb/usr/bin/pip > > another possible cause for the above error message could be a wrong shebang > (the first line in a script indicating its interpreter). > Usually this would expose a different error message - but maybe these > messages are simplified in busybox. > > If the shebang is fine, you will need to find another reason, why this file > could be non-executable. > > btw.: if you really need a full Python environment (incl. third-party > modules), > then maybe an embedded environment like OpenWrt could turn out to complicate > this task a bit too much. Could micropython be an option instead? Or a > distribution that is not targeted at embedded devices? > > Cheers, > Lars > ___ > openwrt-users mailing list > openwrt-users@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-users ___ openwrt-users mailing list openwrt-users@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-users
Re: [OpenWrt-Users] Pip command found error even though pip is installed
Hello Phani, Am Wed, 18 Apr 2018 18:14:28 -0500 schrieb Phani Siriki: > root@OpenWrt:~# ldd /mnt/usb/usr/bin/pip > -ash: /mnt/usb/usr/bin/pip: not found > root@OpenWrt:~# ls -l /mnt/usb/usr/bin/pip > -rwxr-xr-x1 root root 284 Sep 9 2015 /mnt/usb/usr/bin/pip another possible cause for the above error message could be a wrong shebang (the first line in a script indicating its interpreter). Usually this would expose a different error message - but maybe these messages are simplified in busybox. If the shebang is fine, you will need to find another reason, why this file could be non-executable. btw.: if you really need a full Python environment (incl. third-party modules), then maybe an embedded environment like OpenWrt could turn out to complicate this task a bit too much. Could micropython be an option instead? Or a distribution that is not targeted at embedded devices? Cheers, Lars ___ openwrt-users mailing list openwrt-users@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-users
Re: [OpenWrt-Users] Pip command found error even though pip is installed
Hi Lars You are correct. There are some relocation errors, Could you give me some pointers on how to resolve this? root@Mesh-30:~# ldd /usr/bin/python /lib/ld-uClibc.so.0 (0x55566000) libpython2.7.so.1.0 => /mnt/usb/usr/lib/libpython2.7.so.1.0 (0x77c9e000) libpthread.so.0 => /lib/ld-uClibc.so.0 (0x55566000) libdl.so.0 => /lib/ld-uClibc.so.0 (0x55566000) libutil.so.0 => /lib/ld-uClibc.so.0 (0x55566000) libz.so.1 => /usr/lib/libz.so.1 (0x77c7e000) libm.so.0 => /lib/ld-uClibc.so.0 (0x55566000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x77c5a000) libc.so.0 => /lib/ld-uClibc.so.0 (0x55566000) Error relocating /mnt/usb/usr/lib/libpython2.7.so.1.0: __fgetc_unlocked: symbol not found Error relocating /mnt/usb/usr/lib/libpython2.7.so.1.0: __isinf: symbol not found Error relocating /mnt/usb/usr/lib/libpython2.7.so.1.0: __ctype_toupper: symbol not found Error relocating /mnt/usb/usr/lib/libpython2.7.so.1.0: __fputc_unlocked: symbol not found Error relocating /mnt/usb/usr/lib/libpython2.7.so.1.0: __ctype_tolower: symbol not found Error relocating /mnt/usb/usr/lib/libpython2.7.so.1.0: __ctype_b: symbol not found Error relocating /mnt/usb/usr/lib/libpython2.7.so.1.0: fcntl64: symbol not found Error relocating /mnt/usb/usr/lib/libpython2.7.so.1.0: __isinff: symbol not found Error relocating /mnt/usb/usr/lib/libpython2.7.so.1.0: __finite: symbol not found Error relocating /mnt/usb/usr/lib/libpython2.7.so.1.0: tmpnam_r: symbol not found Error relocating /mnt/usb/usr/lib/libpython2.7.so.1.0: __isnan: symbol not found Error relocating /usr/bin/python: __uClibc_main: symbol not found Best Regards Phani On Wed, Feb 14, 2018 at 4:09 PM, Lars Krusewrote: > Hello Phani, > > > Am Wed, 14 Feb 2018 15:00:34 -0600 > schrieb Phani Siriki : > > > root@Mesh-30:~# python > > -ash: python: not found > > I guess, this means that one of the libraries that the python binary is > linked > against, is missing. > Maybe run "ldd /usr/bin/python" and check if all referenced libraries > exist. > > Cheers, > Lars > ___ > openwrt-users mailing list > openwrt-users@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-users > ___ openwrt-users mailing list openwrt-users@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-users
Re: [OpenWrt-Users] Pip command found error even though pip is installed
Hello Phani, Am Wed, 14 Feb 2018 15:00:34 -0600 schrieb Phani Siriki: > root@Mesh-30:~# python > -ash: python: not found I guess, this means that one of the libraries that the python binary is linked against, is missing. Maybe run "ldd /usr/bin/python" and check if all referenced libraries exist. Cheers, Lars ___ openwrt-users mailing list openwrt-users@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-users
Re: [OpenWrt-Users] Pip command found error even though pip is installed
Hi Lars I am now facing problem with python on a different router. I have installed python on USB stick and I could not execute it. oot@Mesh-30:~# df -h FilesystemSize Used Available Use% Mounted on /dev/root 4.8M 4.8M 0 100% /rom tmpfs61.3M 1012.0K 60.3M 2% /tmp /dev/mtdblock32.0M756.0K 1.3M 37% /overlay overlayfs:/overlay2.0M756.0K 1.3M 37% / tmpfs 512.0K 0512.0K 0% /dev */dev/sda129.2G401.1M 27.3G 1% /mnt/usb* root@Mesh-30:~# opkg files python Package python (2.7.9-6) is installed on usb and has the following files: root@Mesh-30:~# root@Mesh-30:~# which python /usr/bin/python root@Mesh-30:~# ls -l /usr/bin/python lrwxrwxrwx1 root root23 Feb 14 14:39 /usr/bin/python -> /mnt/usb/usr/bin/python root@Mesh-30:~# python python python2python2.7 root@Mesh-30:~# python -ash: python: not found Tab autocompletion works, however it says command not found. Could you please suggest if you have any idea on this? Best Regards Phani On Tue, Feb 6, 2018 at 6:11 PM, Phani Sirikiwrote: > Hi Lars > > Thank you for your reply. > > Yes. "python -m pip" worked. > > Best Regards > Phani > > On Tue, Feb 6, 2018 at 5:50 PM, Lars Kruse wrote: > >> Hello Phani, >> >> >> Am Tue, 6 Feb 2018 10:14:46 -0600 >> schrieb Phani Siriki : >> >> > I am using chaos calmer build and installed python on usb. When i tried >> to >> > install python-pip, it gives me below error. However, pip is installed. >> But >> > when I tried to run it, it says command not found. Could some one help >> me >> > on this? >> >> did you take a look at the list of files belonging to the "python-pip" >> package? >> >> opkg files python-pip >> >> I could imagine, that the package contains only the python module - and >> maybe not a script in /usr/bin. >> >> Maybe "python -m pip ..." works? >> (just wild guessing) >> >> Lars >> ___ >> openwrt-users mailing list >> openwrt-users@lists.openwrt.org >> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-users >> > > ___ openwrt-users mailing list openwrt-users@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-users
Re: [OpenWrt-Users] Pip command found error even though pip is installed
Hi Lars Thank you for your reply. Yes. "python -m pip" worked. Best Regards Phani On Tue, Feb 6, 2018 at 5:50 PM, Lars Krusewrote: > Hello Phani, > > > Am Tue, 6 Feb 2018 10:14:46 -0600 > schrieb Phani Siriki : > > > I am using chaos calmer build and installed python on usb. When i tried > to > > install python-pip, it gives me below error. However, pip is installed. > But > > when I tried to run it, it says command not found. Could some one help me > > on this? > > did you take a look at the list of files belonging to the "python-pip" > package? > > opkg files python-pip > > I could imagine, that the package contains only the python module - and > maybe not a script in /usr/bin. > > Maybe "python -m pip ..." works? > (just wild guessing) > > Lars > ___ > openwrt-users mailing list > openwrt-users@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-users > ___ openwrt-users mailing list openwrt-users@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-users
Re: [OpenWrt-Users] Pip command found error even though pip is installed
Hello Phani, Am Tue, 6 Feb 2018 10:14:46 -0600 schrieb Phani Siriki: > I am using chaos calmer build and installed python on usb. When i tried to > install python-pip, it gives me below error. However, pip is installed. But > when I tried to run it, it says command not found. Could some one help me > on this? did you take a look at the list of files belonging to the "python-pip" package? opkg files python-pip I could imagine, that the package contains only the python module - and maybe not a script in /usr/bin. Maybe "python -m pip ..." works? (just wild guessing) Lars ___ openwrt-users mailing list openwrt-users@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-users