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 Kruse wrote: > 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 Yes. I have adjusted the LA_LIBRARY_PATH as below. But still pip cant be found. root@OpenWrt:~# echo $LD_LIBRARY_PATH /mnt/usb/lib:/mnt/usb/usr/lib root@OpenWrt:~# root@OpenWrt:~# root@OpenWrt:~# ldd /mnt/usb/usr/bin/pip -ash: /mnt/usb/usr/bin/pip: not found root@OpenWrt:~# root@OpenWrt:~# root@OpenWrt:~# ls -l /mnt/usb/usr/bin/pip -rwxr-xr-x1 root root 284 Sep 9 2015 /mnt/usb/usr/bin/pip Best Regards Phani On Wed, Apr 18, 2018 at 5:16 PM, Lars Kruse wrote: > Hi Phani, > > > Am Wed, 18 Apr 2018 14:04:08 -0500 > schrieb Phani Siriki : > >> root@OpenWrt:~# which pip >> /mnt/usb/usr/bin/pip >> root@OpenWrt:~# >> root@OpenWrt:~# pip >> -ash: pip: not found > > I guess, the lines above show the problem: the pip executable can be found, > but > its execution fails with "not found". > This is a slightly ambiguous message telling you, that either the executable > or one its linked libraries is missing. Just run "ldd /mnt/usb/usr/bin/pip" in > order to find name of the missing library. Did you adjust the LD_LIBRARY_PATH > in order to use libraries installed outside of your root filesystem? > > 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
Hi Phani, Am Wed, 18 Apr 2018 14:04:08 -0500 schrieb Phani Siriki : > root@OpenWrt:~# which pip > /mnt/usb/usr/bin/pip > root@OpenWrt:~# > root@OpenWrt:~# pip > -ash: pip: not found I guess, the lines above show the problem: the pip executable can be found, but its execution fails with "not found". This is a slightly ambiguous message telling you, that either the executable or one its linked libraries is missing. Just run "ldd /mnt/usb/usr/bin/pip" in order to find name of the missing library. Did you adjust the LD_LIBRARY_PATH in order to use libraries installed outside of your root filesystem? 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 facing new problem while I try to use pip on a different router. I have installed python and python-pip on usb. python is working fine, but pip is not working now. root@OpenWrt:~# which python /mnt/usb/usr/bin/python root@OpenWrt:~# which pip /mnt/usb/usr/bin/pip root@OpenWrt:~# root@OpenWrt:~# pip -ash: pip: not found root@OpenWrt:~# root@OpenWrt:~# python -m pip -V /mnt/usb/usr/bin/python: File not found; 'pip' is a package and cannot be directly executed root@OpenWrt:~# root@OpenWrt:~# root@OpenWrt:~# opkg files python-pip Package python-pip (1.5.6-1) is installed on usb and has the following files: /mnt/usb/usr/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/_vendor/html5lib/treebuilders/__init__.py /mnt/usb/usr/bin/pip It is installed in site-packages. Does it have any effect? Could you please provide some inputs on this? Best Regards Phani On Wed, Feb 14, 2018 at 4:19 PM, Phani Siriki wrote: > 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 Kruse wrote: >> >> 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
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 Kruse wrote: > 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 Siriki wrote: > 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 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
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