Forum
[PROBLEM] Installing python modules fails - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Additional Packages (/forum-22.html)
+--- Thread: [PROBLEM] Installing python modules fails (/thread-4149.html)



Installing python modules fails - postcd - 25th Apr, 2022 07:41 PM

Hello,

I have tried to install some modules like "$ sudo python3 -m pip install coincurve"
but it fails, as shown in the output here.

Please what is likely wrong and what to try to install that module/s?

Actually i am trying to install multiple modules from requirements.txt file:
Quote:gevent==1.4.0; python_version <= "3.6"
greenlet==0.4.16; python_version <= "3.6"
gevent>=20.9.0; python_version >= "3.7"
msgpack>=0.4.4
base58
merkletools
rsa
PySocks>=1.6.8
pyasn1
websocket_client
gevent-ws
coincurve
maxminddb
(sudo python3 -m pip install -r ./requirements.txt)


RE: Installing python modules fails - Nachteule - 25th Apr, 2022 07:58 PM

Actually, this has nothing to do with XBian.

Have you taken the trouble to inspect the error log? It clearly says error: command 'arm-linux-gnueabihf-gcc' failed: No such file or directory.

So, no gcc installed


RE: Installing python modules fails - postcd - 26th Apr, 2022 03:45 AM

How to install gcc?
$ sudo apt install gcc-arm-linux-gnueabihf
cause The following NEW packages will be installed:
Quote: binutils binutils-arm-linux-gnueabihf binutils-common cpp cpp-10 gcc gcc-10 libasan6 libatomic1 libbinutils libcc1-0 libctf-nobfd0 libctf0 libgcc-10-dev libisl23 libmpc3 libmpfr6 libubsan1

among other installed:
Quote:Setting up gcc-10 (10.2.1-6) ...
Setting up gcc (4:10.2.1-1) ...

$ pip install ...:
error: command '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1

yet it is fake message, that path exist:
$ /usr/bin/arm-linux-gnueabihf-gcc
Quote:arm-linux-gnueabihf-gcc: fatal error: no input files
compilation terminated.



RE: Installing python modules fails - Nachteule - 26th Apr, 2022 04:03 AM

Again, look in the log:
Code:
arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.9 -c c/_cffi_backend.c -o build/temp.linux-armv7l-3.9/c/_cffi_backend.o

There are certainly still quite a few packages missing for the building of the cffi
But you have to find out for yourself which ones they are

(libffi-dev would already be a start)


RE: Installing python modules fails - postcd - 26th Apr, 2022 05:19 AM

When i "apt install libffi-dev", it still shows error output, this time for pysha3.
After searching for pysha3 debian package, found it may be package "python3-sha3":

sudo apt install python*sha3
Then the "pip install merkletools" succeeded without any error.

Both packages 300kB of data extracted.

But after running "pip install -r ./requirements.txt" cffi error output still there, so after searching "cffi python3 package debian" installed "sudo apt install python3-cffi"

cffi error remains as seen in this output of pip install command.

$ sudo python3 -m pip install cffi
Requirement already satisfied: cffi in /usr/lib/python3/dist-packages (1.14.5)


RE: Installing python modules fails - Nachteule - 26th Apr, 2022 05:46 AM

Read this: https://ofek.dev/coincurve/install/
You must still be missing python3-dev


RE: Installing python modules fails - postcd - 26th Apr, 2022 06:05 AM

Thanks, my pip version fits their requirements and command they mention:
sudo apt-get install autoconf automake build-essential libffi-dev libtool pkg-config python3-dev

means like +70MB used (while i already installed maybe 30MB, but i guess there is no "coincurve" python package in the repository Undecided

anyway that command helped, even i am not happy it uses that disk space (guessing it is not recommended to remove it now after install). Thank you for help!


RE: Installing python modules fails - Nachteule - 26th Apr, 2022 06:10 AM

All this stuff is only needed to create the python3 module.
The -dev packages, the gcc and a lot more can certainly be removed safely. But what are 100MB these days?


RE: Installing python modules fails - VictorJane - 18th Jul, 2022 12:29 PM

Only the python3 module has to be made with all of these things.
It is okay to delete the gcc, the -dev packages, and many other items. But what do 100MB today mean?


stickman fighter


RE: Installing python modules fails - Billie34 - 7th Nov, 2023 12:49 PM

(26th Apr, 2022 06:05 AM)postcd Wrote:  Thanks, my pip version fits their requirements and command they mention:
sudo apt-get install autoconf automake build-essential libffi-dev libtool pkg-config python3-dev

means like +70MB used suika game (while i already installed maybe 30MB, but i guess there is no "coincurve" python package in the repository Undecided

anyway that command helped, even i am not happy it uses that disk space (guessing it is not recommended to remove it now after install). Thank you for help!
My version is also quite suitable


RE: Installing python modules fails - ericemorson - 4th May, 2024 05:20 PM

(26th Apr, 2022 04:03 AM)Nachteule Wrote:  Again, look in the log:
Code:
arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-jS0VHk/ [url=https://bobtherobber.io][color=#000000]bob the robber[/color][/url] python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.9 -c c/_cffi_backend.c -o build/temp.linux-armv7l-3.9/c/_cffi_backend.o

There are certainly still quite a few packages missing for the building of the cffi
But you have to find out for yourself which ones they are

(libffi-dev would already be a start)

have the answer. Thanks