I am not able to find any command to check if my python is compiled for 32bit system or 64bit system.
I tried
python
an
Type in Linux console:
- In case when you want check whether an application has 64 bit or 32 bit architecture by using its command for run:
type -p | xargs readlink -f | xargs file -b | sed 's/, /\n/g' | sed -n 2p
- In case when you want check whether an application has 64 bit or 32 bit architecture by using full path to the application:
file -b | sed 's/, /\n/g' | sed -n 2p
For example, for Python 3 corresponding commands can be:
type -p python3 | xargs readlink -f | xargs file -b | sed 's/, /\n/g' | sed -n 2p
file -b /usr/bin/python3.5 | sed 's/, /\n/g' | sed -n 2p
Possible output:
x86-64
or
Intel 80386
or
ARM
or other.
If output is "Intel 80386" than the application has 32 bit architecture.
If output is "x86-64" than the application has 64 bit architecture.