Tiny Core Linux

Tiny Core Extensions => TCE Bugs => Topic started by: Aladin on March 30, 2020, 12:29:26 PM

Title: python error
Post by: Aladin on March 30, 2020, 12:29:26 PM
/usr/local/bin/python: line 1: syntax error: unexpected "("

i need help
Title: Re: python error
Post by: Juanito on March 30, 2020, 12:33:37 PM
Which version of python are you using and what command did you issue to get that error message?
Title: Re: python error
Post by: Aladin on March 30, 2020, 12:38:48 PM
i use python 3.6
i try to run sudo python
Title: Re: python error
Post by: Juanito on March 30, 2020, 01:24:46 PM
Does "sudo python3.6" give the same result?
Title: Re: python error
Post by: Aladin on March 30, 2020, 05:33:01 PM
yes
/usr/local/bin/python3.6: line 1: syntax error: unexpected "("
Title: Re: python error
Post by: Juanito on March 31, 2020, 02:15:46 AM
I only have piCore 9.x on an RPi3 and piCore 11.x on an RPi4 to test and python works fine on both.

I downloaded the python3.6 extension from the piCore 10.x repo and it looks OK.

Do you get this:
Code: [Select]
$ tce-load -i file
$ file /usr/local/bin/python3.6
ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, stripped
Title: Re: python error
Post by: Rich on March 31, 2020, 07:25:19 AM
Hi Juanito
I think you nailed it. I recently had a similar error pop up and I've been racking my brain try to remember the cause. I think it was
caused by a binary that didn't match my architecture.
Title: Re: python error
Post by: Aladin on March 31, 2020, 08:23:46 AM
$ tce-load -i file
$ file /usr/local/bin/python3.6
/usr/local/bin/file: line 1: syntax error: unexpected "("
Title: Re: python error
Post by: Juanito on March 31, 2020, 08:34:51 AM
What machine are you using and with which architecture of tinycore?
Title: Re: python error
Post by: Aladin on March 31, 2020, 09:05:26 AM
i use Rpi3b+  with piCore-10.0beta12b
Title: Re: python error
Post by: Juanito on March 31, 2020, 10:03:54 AM
How did you download python3.6? Did you use “tce-load -w” or did you download it manually?

I ask you get that sort of error from the incorrect architecture.
Title: Re: python error
Post by: Aladin on March 31, 2020, 10:18:32 AM
I download it manually
Title: Re: python error
Post by: Juanito on March 31, 2020, 10:32:53 AM
Maybe you could try deleting it and downloading with “tce-load -wil python3.6”?
Title: Re: python error
Post by: Aladin on March 31, 2020, 11:04:17 AM
when i try this any solution
sudo wifi.sh
No wifi devices found!
Title: Re: python error
Post by: Juanito on March 31, 2020, 11:08:51 AM
You will need a wired connection.
Title: Re: python error
Post by: Aladin on March 31, 2020, 11:18:13 AM
with a wired connection i can't use my laptop just using with TV ?
and how to make sure that wired connection is working ?
Title: Re: python error
Post by: Juanito on March 31, 2020, 12:03:09 PM
The wired connection will work with the base piCore without needing any additional extensions.

I'm not sure if the required extensions - wifi firmware, etc - are present in the piCore 10.x repo.
Title: Re: python error
Post by: Aladin on March 31, 2020, 03:16:34 PM
in this one http://mirrors.nju.edu.cn/tinycorelinux/10.x/x86/tcz/ ?
Title: Re: python error
Post by: Rich on March 31, 2020, 03:46:53 PM
Hi Aladin
What does this command return:
Code: [Select]
uname -a
Title: Re: python error
Post by: Aladin on March 31, 2020, 03:56:06 PM
uname -a return :

Linux box 4.19.13-piCore-v7 #1 SMP Sat Jan 5 08:56:20 UTC 2019 armv7l GNU/Linux
Title: Re: python error
Post by: Rich on March 31, 2020, 04:36:42 PM
Hi Aladin
4.19.13 might be an older beta release. The current kernel is  4.19.58.

in this one http://mirrors.nju.edu.cn/tinycorelinux/10.x/x86/tcz/ ?
Absolutely not. That repo is for Intel x86 CPUs. You are running an ARMv7 CPU. You need to go here:
Code: [Select]
http://mirrors.nju.edu.cn/tinycorelinux/10.x/armv7/tcz/
But first you need to update your system. I think it's this file:
Code: [Select]
http://mirrors.nju.edu.cn/tinycorelinux/10.x/armv7/test_relases/RPi/piCore-10.0beta12b.zip
Title: Re: python error
Post by: Aladin on April 01, 2020, 06:18:39 AM
tce-load -i wifi
wireless-4.19.13-piCore-v7.tcz not found!
need help
Title: Re: python error
Post by: Juanito on April 01, 2020, 06:50:51 AM
As has been explained, you need to update the latest version of piCore 10.x beta - this will then look for the wireless-4.19.58-piCore-v7 extension in the piCore 10.x repo.

The above being said, given that you will need to change the version of piCore you are using, I would suggest:

First choice: piCore 9.x
Second choice piCore 11.x beta
Title: Re: python error
Post by: Aladin on April 01, 2020, 07:20:43 AM
when i install piCore 11.x 
how can i install wifi ?
tce-load -wi wifi
error on wifi.tcz

how to solve it 
Title: Re: python error
Post by: Juanito on April 01, 2020, 07:26:23 AM
The easiest way is to install the piCore 9.x stable release as suggested
Title: Re: python error
Post by: Aladin on April 01, 2020, 09:05:21 AM
i have RPi3 b+ piCore 9.x not work on it  :-X
Title: Re: python error
Post by: Juanito on April 01, 2020, 09:47:00 AM
I’ll try to have a look at piCore 11.x tomorrow.
Title: Re: python error
Post by: Aladin on April 01, 2020, 10:31:41 AM
how to run .EXE file in piCore ?
Title: Re: python error
Post by: Rich on April 01, 2020, 10:41:18 AM
Hi Aladin
piCore is Linux and  .EXE  is Windows. .EXE  files will not run in piCore.
Title: Re: python error
Post by: Aladin on April 01, 2020, 10:43:21 AM
so what should i do to run it
any other method ?
Title: Re: python error
Post by: Juanito on April 01, 2020, 10:49:56 AM
Which windows file are you trying to run - maybe there is a linux equivalent?
Title: Re: python error
Post by: Aladin on April 01, 2020, 11:16:55 AM
I try to convert .py to .exe and put it in the sd card
Title: Re: python error
Post by: Rich on April 01, 2020, 12:58:41 PM
Hi Aladin
Run it under Windows, run it under  WINE , or find a Linux version of what you are trying to run. WINE is not available for piCore and
is likely too resource intensive to run on piCore.
Title: Re: python error
Post by: Juanito on April 02, 2020, 04:05:34 AM
when i install piCore 11.x 
how can i install wifi ?
tce-load -wi wifi
error on wifi.tcz

how to solve it

wifi should work with piCore 11.x armv7 now:

Code: [Select]
$ cat /proc/cpuinfo | grep Model
Model           : Raspberry Pi 3 Model B Rev 1.2

$ version
11.0beta1a

$ tce-load -wil firmware-rpi-wireless
$ tce-load -wil wireless-KERNEL
$ dmesg | tail -15
...
[ 3737.522708] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 3737.543585] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 3737.543692] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 3737.543698] cfg80211: failed to load regulatory.db
[ 3737.556288] brcmfmac: F1 signature read @0x18000000=0x1541a9a6
[ 3737.560204] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[ 3737.560365] usbcore: registered new interface driver brcmfmac
[ 3737.751547] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[ 3737.751621] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available
[ 3737.752178] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Oct 23 2017 03:55:53 version 7.45.98.38 (r674442 CY) FWID 01-e58d219f

$ rfkill list
0: phy0: wlan
        Soft blocked: no
        Hard blocked: no

$ tce-load -wil wifi
$ sudo wifi.sh

Select Wifi Network

    ESSID                         Enc   Qual    Channel Type           
 1. juanitonet                         on    70       8     WPA

Enter selection ( 1 - 1 ) or (q)uit: 1
Enter password for juanitonet (8 to 63 characters): **********
Sending credentials to requested access point juanitonet..
deleting routers
adding dns 8.8.8.8
adding dns 8.8.4.4
Title: Re: python error
Post by: Aladin on April 02, 2020, 05:28:42 AM
How to get executable file working in linux
Title: Re: python error
Post by: Juanito on April 02, 2020, 05:46:43 AM
Code: [Select]
$ chmod +x file_name