duino-coin icon indicating copy to clipboard operation
duino-coin copied to clipboard

I can't run the PC_Miner script.py on Orange Pi PC.

Open Rusich1980 opened this issue 4 years ago • 6 comments

I installed Debian on my Orange Pi PC. According to the instructions in the Get Started section, I installed Python 3 versions in the terminal. When trying to run a script from the terminal PC_Miner.py a syntax error is returned. A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'root@orangePi:~/duino-coin# python3 PC_Miner.py'
  2. Click on 'Enter'
  3. See error: File "PC_Miner.py", line 186 pretty_print(f"Warning: {response['message/]}"

System (please complete the following information):

  • OS: OrangePi_pc_debian_stretch_desktop_linux3.4.113_v1.0
  • PC_Miner

Please help me solve the problem. I can't find a solution for several days. I do not know Python. That's why I turned to you.

Rusich1980 avatar Dec 19 '21 12:12 Rusich1980

Hello! I send fuul output root@orangepipc:/home/orangepi# cd duino-coin root@orangepipc:/home/orangepi/duino-coin# python3 PC_Miner.py File "PC_Miner.py", line 186 pretty_print(f"Warning: {response['message']}" ^ SyntaxError: invalid syntax root@orangepipc:/home/orangepi/duino-coin#

I've tried other OS - ubuntu for Orange Pi PC. The error appears in both Ubuntu and Debian. Doth distros are created for Orange Pi PC

Rusich1980 avatar Dec 20 '21 04:12 Rusich1980

I installed Python? according to the Read me from the folder in the Linux section.

root@orangepipc:/home/orangepi/duino-coin# apt install python3 python3-pip git python3-pil python3-pil.imagetk -y Reading package lists... Done Building dependency tree
Reading state information... Done python3 is already the newest version (3.5.1-3). git is already the newest version (1:2.7.4-0ubuntu1.10). python3-pil is already the newest version (3.1.2-0ubuntu1.6). python3-pil.imagetk is already the newest version (3.1.2-0ubuntu1.6). python3-pip is already the newest version (8.1.1-2ubuntu0.6). The following packages were automatically installed and are no longer required: libnl-route-3-200 libtomcrypt0 libtommath0 timelimit Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. root@orangepipc:/home/orangepi/duino-coin#

root@orangepipc:/home/orangepi/duino-coin# python3 -m pip install -r requirements.txt Collecting py-cpuinfo (from -r requirements.txt (line 1)) Using cached https://files.pythonhosted.org/packages/e6/ba/77120e44cbe9719152415b97d5bfb29f4053ee987d6cb63f55ce7d50fadc/py-cpuinfo-8.0.0.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in ImportError: No module named 'setuptools'

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-7e1h5wt6/py-cpuinfo/ You are using pip version 8.1.1, however version 21.3.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command. root@orangepipc:/home/orangepi/duino-coin#

root@orangepipc:/home/orangepi/duino-coin# pip install --upgrade pip Collecting pip Using cached https://files.pythonhosted.org/packages/da/f6/c83229dcc3635cdeb51874184241a9508ada15d8baa337a41093fab58011/pip-21.3.1.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in ImportError: No module named setuptools

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-P4II5h/pip/ You are using pip version 8.1.1, however version 21.3.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command. root@orangepipc:/home/orangepi/duino-coin#

root@orangepipc:/home/orangepi/duino-coin# pip install --upgrade pip Collecting pip Using cached https://files.pythonhosted.org/packages/da/f6/c83229dcc3635cdeb51874184241a9508ada15d8baa337a41093fab58011/pip-21.3.1.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in ImportError: No module named setuptools

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-P4II5h/pip/ You are using pip version 8.1.1, however version 21.3.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command. root@orangepipc:/home/orangepi/duino-coin#

And here I am getting errors again because of Python. I do not know how to fix them. P.S. I appologize for my English. It's not my native.

Rusich1980 avatar Dec 20 '21 04:12 Rusich1980

Python you're using is from 2015 (3.5). You need at least 3.7. Update it and you'll have no issues

revoxhere avatar Dec 20 '21 06:12 revoxhere

My config: Host: orangepipc Kernel: 5.4.65-sunxi armv7l bits: 32 Desktop: Xfce 4.12.4 Distro: Debian GNU/Linux 10 (buster) Machine: Type: ARM Device System: Xunlong Orange Pi PC details: Allwinner sun8i Family rev: N/A serial: 02c00081597c0fe5 CPU: Topology: Quad Core model: ARMv7 v7l variant: cortex-a7 bits: 32 type: MCP Speed: 1368 MHz min/max: 480/1368 MHz Core speeds (MHz): 1: 1368 2: 1368

My another errors:

orangepi@orangepipc:~$ sudo apt install python3 python3-pip git python3-pil python3-pil.imagetk -y Reading package lists... Done Building dependency tree
Reading state information... Done git is already the newest version (1:2.20.1-2+deb10u3). python3-pil is already the newest version (5.4.1-2+deb10u2). python3-pil.imagetk is already the newest version (5.4.1-2+deb10u2). python3-pip is already the newest version (18.1-5). python3 is already the newest version (3.7.3-1). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. orangepi@orangepipc:~$ cd duino-coin orangepi@orangepipc:~/duino-coin$ python3 PC_Miner.py Traceback (most recent call last): File "PC_Miner.py", line 831, in Miner.preload() File "PC_Miner.py", line 461, in preload mkdir(Settings.DATA_DIR) PermissionError: [Errno 13] Permission denied: 'Duino-Coin PC Miner 2.75' orangepi@orangepipc:~/duino-coin$

Rusich1980 avatar Dec 20 '21 18:12 Rusich1980

Try sudo chmod 777 "Duino-Coin PC Miner 2.8" or launch the miner with sudo

revoxhere avatar Dec 20 '21 19:12 revoxhere

Hi! I have solved the problem! It is possible that my solution will help other Orange Pi PC owners as well. In general, for a long time I tried to solve the problem of launching PC_Miner. I installed Debian and Ubuntu designed for Orange Pi PC (I downloaded them from the official website for OrangePi). There were no results. I spent more than a week of sleepless nights battling with errors that appeared when installing or updating Python 3 components. I was already desperate to start mining on my Orange, when I remembered that there is another OS designed specifically for single-board PCs. And this is the Arabian. I downloaded the latest version, launched it on an Orange, updated it via the terminal. Led the commands that are listed on the Get Started page of the Duino-Coin website sequentially. And all commands were accepted by the system without errors. Mining has begun! I was satisfied with the work done!. Special thanks to Revoxhere for helping me solve my problems with the program.

Rusich1980 avatar Dec 25 '21 20:12 Rusich1980