Hi Lars

Thanks for your input. I am able to execute python script after
creating below soft links.

 ln -s /mnt/usb/usr/lib/libz.so.1 /usr/lib/libz.so.1
 ln -s /mnt/usb/lib/libpthread.so.0 /usr/lib/libpthread.so.0
 ln -s /mnt/usb/usr/lib/libpython2.7.so.1.0  /usr/lib/libpython2.7.so.1.0

However, I am unable to import "ctypes" module. I am getting below error.

Traceback (most recent call last):
  File "/root/change_wifi_params.py", line 43, in <module>
    import ctypes
  File "/mnt/usb/usr/lib/python2.7/ctypes/__init__.py", line 10, in <module>
    from _ctypes import Union, Structure, Array
ImportError: File not found

sys.path:
=======

/mnt/usb/usr/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg
/mnt/usb/usr/lib/python27.zip
/mnt/usb/usr/lib/python2.7
/mnt/usb/usr/lib/python2.7/plat-linux2
/mnt/usb/usr/lib/python2.7/lib-tk
/mnt/usb/usr/lib/python2.7/lib-old
/mnt/usb/usr/lib/python2.7/lib-dynload
/mnt/usb/usr/lib/python2.7/site-packages
/mnt/usb/usr/lib/python2.7/site-packages/setuptools-7.0-py2.7.egg

root@OpenWrt:~#
root@OpenWrt:~# ls /mnt/usb/usr/lib/python2.7/lib-dynload/_ctypes.so
/mnt/usb/usr/lib/python2.7/lib-dynload/_ctypes.so
root@OpenWrt:~#

I am able to import the module through normal execution. However it is
not working in rpcd shell script. Could you please give me some
inputs?

root@OpenWrt:~# python
Python 2.7.9 (default, Sep  9 2015, 07:59:02)
[GCC 4.8.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes
>>>
>>>
root@OpenWrt:~#

Best Regards
Phani

On Sat, Feb 17, 2018 at 1:16 PM,  <yvsg.pha...@gmail.com> wrote:
> Sure Lars. I will check it.
>
> Best regards
> Phani
>
> Sent from my iPhone
>
>> On Feb 17, 2018, at 12:55 PM, Lars Kruse <li...@sumpfralle.de> wrote:
>>
>> Hello Phani,
>>
>>
>> Am Sat, 17 Feb 2018 12:22:02 -0600
>> schrieb Phani Siriki <yvsg.pha...@gmail.com>:
>>
>>> root@OpenWrt:~# cat file-name
>>> /usr/bin/python: can't load library 'libpython2.7.so.1.0'
>>
>> so this discussion revolved around the same topic as your other thread
>> ("Pip command found error even though pip is installed").
>> Thus you will need to fix your python installation.
>>
>> The usual steps:
>> * remove and install again
>> * find out, how your setup differs from the setup of others
>>
>> 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

Reply via email to