silicoin-network / silicoin-blockchain

Silicoin blockchain python implementation (full node, farmer, harvester, timelord, and wallet)
Apache License 2.0
79 stars 28 forks source link

Failed to install from sources --- No matching distribution found for miniupnpc==2.1 #172

Closed PrEzi3 closed 2 years ago

PrEzi3 commented 2 years ago

When performing the install from sources according to manual on RaspberryPI/Ubuntu 21.10 https://github.com/silicoin-network/silicoin-blockchain/wiki/Install-From-Source I get an error: [...] Successfully installed pip-21.3.1 Looking in indexes: https://hosted.chia.net/simple/ ERROR: Could not find a version that satisfies the requirement miniupnpc==2.1 (from versions: none) ERROR: No matching distribution found for miniupnpc==2.1 and it fails to install.

Every other fork installs correctly via git clone ... sh install.sh

albertcoady commented 2 years ago

It seems a network problem.

PrEzi3 commented 2 years ago

How is this an network error (Oh I know --- you also googled for a few seconds.... sorry -- been there, done that...) ----- I can correctly connect and check for version. Adding a second index (by modifying the installLinux.sh) then shows a different error. It simply cannot find a matching miniupnpc for the requirements...

Did several tries also on a clean image, even turned off the firewall. I repeat -- I can successfully compile (also remotely) other forks.

Try it on a raspberrypi with newest ubuntu 21.10 and python 3.9.7 by yourself...

PrEzi3 commented 2 years ago

Is it possible to provide a precompiled image again or to upload the full sources to the git so we can... do this like for any other normal fork ? you know.... git clone..... sh install.sh...... ?

PrEzi3 commented 2 years ago

A cite from chia changelog :
"We are now using miniupnpc version 2.2.2 so that we can support Python 3.9 on Windows." Might be the culprit ? on the Ubuntu distros you have normally python 3.9.7.

weneve2 commented 2 years ago

maybe it wrote 'pip install -i xxx xxx=xxx' in the script , but the default pip verison of your system is python2 , there was no satisfied version found in that link? i met this problem too , and after i installed , i executed 'sit start node' , it said that the command is not found ...... this made me angry , wtf ......

PrEzi3 commented 2 years ago

I have python 3.9.7. only. Crystalclean RaspberryPI minimalistic Ubuntu 21.10 environment to pull most performance from the berry. Only a simple UX (from MINT I believe) plus the necessary packages. I believe the issue is that YOU NEED to have miniupnpc 2.2.1+ for this environment and here is the mismatch --- I simply cannot use 2.1 which is pre-defined here in the install script -- thus it fails. The other installers provided their own environments with their own python version matching the libraries during the compilation --- no problem. You have miniupnpc 2.1 ? You provide Python 3.7 with it. This one pulls the LOCAL python version (which on my side is 3.9.7) and it doesn't find a compatible miniupnpc version (which is hardcoded here to 2.1) but actually required would be something from 2.2.1+ branch.

PrEzi3 commented 2 years ago

Someone knows if it is possible to install/compile manually redirecting to local miniupnpc installation that is higher than that defined in the script ? (I have 2.2.1-1 arm64 installed).
Thanks...

weneve2 commented 2 years ago

I have python 3.9.7. only. Crystalclean RaspberryPI minimalistic Ubuntu 21.10 environment to pull most performance from the berry. Only a simple UX (from MINT I believe) plus the necessary packages. I believe the issue is that YOU NEED to have miniupnpc 2.2.1+ for this environment and here is the mismatch --- I simply cannot use 2.1 which is pre-defined here in the install script -- thus it fails. The other installers provided their own environments with their own python version matching the libraries during the compilation --- no problem. You have miniupnpc 2.1 ? You provide Python 3.7 with it. This one pulls the LOCAL python version (which on my side is 3.9.7) and it doesn't find a compatible miniupnpc version (which is hardcoded here to 2.1) but actually required would be something from 2.2.1+ branch.

https://hosted.chia.net/simple/miniupnpc/ .tmp/ miniupnpc-0.1.dev5-cp37-cp37m-macosx_10_9_x86_64.whl miniupnpc-0.1.dev5-cp37-cp37m-manylinux2010_i686.whl miniupnpc-0.1.dev5-cp37-cp37m-manylinux2010_x86_64.whl miniupnpc-2.0.2-cp37-cp37m-macosx_10_15_x86_64.whl miniupnpc-2.0.2-cp37-cp37m-manylinux2010_x86_64.whl miniupnpc-2.0.2-cp38-cp38-macosx_10_15_x86_64.whl miniupnpc-2.0.2-cp38-cp38-manylinux2010_x86_64.whl miniupnpc-2.1-cp37-cp37m-macosx_10_9_x86_64.whl miniupnpc-2.1-cp37-cp37m-manylinux2010_i686.whl miniupnpc-2.1-cp37-cp37m-manylinux2010_x86_64.whl miniupnpc-2.1-cp38-cp38-macosx_10_9_x86_64.whl miniupnpc-2.1-cp38-cp38-manylinux2010_i686.whl miniupnpc-2.1-cp38-cp38-manylinux2010_x86_64.whl ....uh ... it seems py3.7 and py3.8 is supported only .....

because i have py2.7 py3.6 py3.7 , i modified the scripts pip to pip3.7 , and this was installed perfect ... like what i said above all , i only could launch the node from 'cd /path/to/bin ; ./sit_full_node &' ......i'm so sad

PrEzi3 commented 2 years ago

Thats what I wrote... You need minipnpc 2.2 or higher for python 3.9.x
This is not "a network problem".

PrEzi3 commented 2 years ago

I am a step further on compiling.... however is still fails to build.... replaced the old pip install command in installLinux.sh

pip install -i https://hosted.chia.net/simple/ miniupnpc==2.1 setproctitle==1.1.10

with

pip install -i https://pypi.chia.net/simple/ miniupnpc==2.1 setproctitle==1.1.10

and it finds the necessary modules... but fails to build further ... no matter if I install wheel beforehand or not.

(venv) ubuntu@xxxxxxxx:~/silicoin-blockchain-1.1.5/install_scripts$ pip install --extra-index-url https://pypi.chia.net/simple/ miniupnpc==2.1 setproctitle==1.1.10 Looking in indexes: https://pypi.org/simple, https://pypi.chia.net/simple/ Collecting miniupnpc==2.1 Downloading https://pypi.chia.net/simple/miniupnpc/miniupnpc-2.1-cp39-cp39-manylinux2014_aarch64.whl (49 kB) |████████████████████████████████| 49 kB 267 kB/s
Collecting setproctitle==1.1.10 Downloading https://pypi.chia.net/simple/setproctitle/setproctitle-1.1.10.zip (34 kB) Preparing metadata (setup.py) ... done Using legacy 'setup.py install' for setproctitle, since package 'wheel' is not installed. Installing collected packages: setproctitle, miniupnpc Running setup.py install for setproctitle ... error ERROR: Command errored out with exit status 1: command: /home/ubuntu/silicoin-blockchain-1.1.5/install_scripts/venv/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-pafuzqbc/setproctitle_b2359d3b3f4547c19fbb4b80e698d605/setup.py'"'"'; file='"'"'/tmp/pip-install-pafuzqbc/setproctitle_b2359d3b3f4547c19fbb4b80e698d605/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-8ix36pat/install-record.txt --single-version-externally-managed --compile --install-headers /home/ubuntu/silicoin-blockchain-1.1.5/install_scripts/venv/include/site/python3.9/setproctitle cwd: /tmp/pip-install-pafuzqbc/setproctitle_b2359d3b3f4547c19fbb4b80e698d605/ Complete output (15 lines): running install running build running build_ext building 'setproctitle' extension creating build creating build/temp.linux-aarch64-3.9 creating build/temp.linux-aarch64-3.9/src aarch64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DSPT_VERSION=1.1.10 -DHAVE_SYS_PRCTL_H=1 -I/home/ubuntu/silicoin-blockchain-1.1.5/install_scripts/venv/include -I/usr/include/python3.9 -c src/setproctitle.c -o build/temp.linux-aarch64-3.9/src/setproctitle.o In file included from src/spt.h:15, from src/setproctitle.c:14: src/spt_python.h:14:10: fatal error: Python.h: No such file or directory 14 | #include | ^~~~~~ compilation terminated. error: command '/bin/aarch64-linux-gnu-gcc' failed with exit code 1

ERROR: Command errored out with exit status 1: /home/ubuntu/silicoin-blockchain-1.1.5/install_scripts/venv/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-pafuzqbc/setproctitle_b2359d3b3f4547c19fbb4b80e698d605/setup.py'"'"'; file='"'"'/tmp/pip-install-pafuzqbc/setproctitle_b2359d3b3f4547c19fbb4b80e698d605/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-8ix36pat/install-record.txt --single-version-externally-managed --compile --install-headers /home/ubuntu/silicoin-blockchain-1.1.5/install_scripts/venv/include/site/python3.9/setproctitle Check the logs for full command output.

ilmerovingio commented 2 years ago

Debian Buster and Python 3.9 fails too.

PrEzi3 commented 2 years ago

@ilmerovingio Thanks, this basically confirms it - cannot install on python 3.9.x systems. Would be nice to fix it or provide a solution/workaround @albertcoady

albertcoady commented 2 years ago

@ilmerovingio Thanks, this basically confirms it - cannot install on python 3.9.x systems. Would be nice to fix it or provide a solution/workaround @albertcoady

Have you tried clone the 1.1.5 tag source and run "sh install.sh" command?

PrEzi3 commented 2 years ago

Yes, that works. Builds correctly. However under the v.1.1.5 tag there are only two small changes which up the version. This cannot be a complete change as the source code hasn't been changed since a while (staking fix to be exact).

So..... it is not fixed? As this still fails to compile accordig to the installLinux.sh script ?

PrEzi3 commented 2 years ago

Bumping the thread to not let it close. This is still unsolved.

ilmerovingio commented 2 years ago

Problem still persist in 1.2.0!

PrEzi3 commented 2 years ago

Problem still persist in 1.2.0!

But this time you can clone the (main) repository and install it like any other fork - via sh install.sh Have you tried it ? If not - try and it will install.

ilmerovingio commented 2 years ago

Installing with Python 3.9:

cd /usr/src/ git clone https://github.com/silicoin-network/silicoin-blockchain -b main --recurse-submodules cd silicoin-blockchain/ sh install.sh . ./activate

and it works!

PrEzi3 commented 2 years ago

Installing with Python 3.9:

cd /usr/src/ git clone https://github.com/silicoin-network/silicoin-blockchain -b main --recurse-submodules cd silicoin-blockchain/ sh install.sh . ./activate

and it works!

see ?