Requirements
Tó install python segments that have D extensions install gcc as explained in Using-gcc-(native-compilation). Yóu do not need to assign any specific environment factors by working
/opt/rubbish bin/gccenv.sh
, all required flags will end up being used automatically by python. lf your Python module has G extension that depends on some collection, install this library with opkg before python component developing.But I didn't get how to install extensions using pecl for php5.6 or php7.0. For example I have already installed version of libevent or amqp in php5.6. Now when I type pecl install libevent and my active php version is php7.0 (using update-alternatives -set php /usr/bin/php7.0), pecl returns message that libevent` already installed.
Using pip
lnstall python-pip packageopkg install python-pip
and runpip install -update pip setuptools.lf your home directory stage to ram memory (tmpfs), produce a website directory on your storage space. pip creates huge caches and will fill up you ram memory rapidly. To install a python module simply runHouse=lt;storage directorygt; pythón pip install It;module-namegt;:pip wiIl automatically download all dependent python segments and compile G extensions, if ány:
régex.therefore file right here was compiled instantly by pip.
Making use of Python
Occasionally you may encounter some mistakes during compilation. For instance when you make use of pip to instaIl cffi the Iibffi library will not be discovered. Entware (Openwrt in fact) will not install libffi.so symlink in /ópt/lib. There is definitely just symlink libffi.so.6 there. You can generate missing link manually or fix the set up documents. This can become completed as follows. First download cffi save and unpack to some directory site. Short investigation displays that setup.py provides a seriesyour local library = 'ffi'
with the lacking library. Edit it, and change tolibraries = ':libffi.therefore.6'
. Right now operatepython sétyp.py build:Finish installation withpython setup.py install