当前位置:首页 » 编程语言 » pythonabi24is

pythonabi24is

发布时间: 2022-05-07 10:26:29

⑴ redhat yum安装报错python(abi) = 2.4 is needed by...

试一下安装RPM Forge epel release 6。

linux下安装yum时报错需要python(abi)=2.4请问怎么处理

yum应该已经有了。或者是yum2。
从提示上看。你没有安装python,也没有安装python-elementtree这个库。

安装一下再继续试试看。

⑶ Python3.3里面,s.isdigit和s.isnumeric有什么区别求举例

num = "1" #unicode
num.isdigit() # True
num.isdecimal() # True
num.isnumeric() # True

num = "1" # 全角
num.isdigit() # True
num.isdecimal() # True
num.isnumeric() # True

num = b"1" # byte
num.isdigit() # True
num.isdecimal() # AttributeError 'bytes' object has no attribute 'isdecimal'
num.isnumeric() # AttributeError 'bytes' object has no attribute 'isnumeric'

num = "IV" # 罗马数字
num.isdigit() # True
num.isdecimal() # False
num.isnumeric() # True

num = "四" # 汉字
num.isdigit() # False
num.isdecimal() # False
num.isnumeric() # True

===================
isdigit()
True: Unicode数字,byte数字(单字节),全角数字(双字节),罗马数字
False: 汉字数字
Error: 无

isdecimal()
True: Unicode数字,,全角数字(双字节)
False: 罗马数字,汉字数字
Error: byte数字(单字节)

isnumeric()
True: Unicode数字,全角数字(双字节),罗马数字,汉字数字
False: 无
Error: byte数字(单字节)

================
import unicodedata

unicodedata.digit("2") # 2
unicodedata.decimal("2") # 2
unicodedata.numeric("2") # 2.0

unicodedata.digit("2") # 2
unicodedata.decimal("2") # 2
unicodedata.numeric("2") # 2.0

unicodedata.digit(b"3") # TypeError: must be str, not bytes
unicodedata.decimal(b"3") # TypeError: must be str, not bytes
unicodedata.numeric(b"3") # TypeError: must be str, not bytes

unicodedata.digit("Ⅷ") # ValueError: not a digit
unicodedata.decimal("Ⅷ") # ValueError: not a decimal
unicodedata.numeric("Ⅷ") # 8.0

unicodedata.digit("四") # ValueError: not a digit
unicodedata.decimal("四") # ValueError: not a decimal
unicodedata.numeric("四") # 4.0

#"〇","零","一","壱","二","弐","三","参","四","五","六","七","八","九","十","廿","卅","卌","百","千","万","万","亿"

⑷ linux上安装python3.4.4,执行./configure的时候报错,怎么解决

config.log的内容:
This file contains any messages proced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by python configure 3.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure
## --------- ##
## Platform. ##
## --------- ##
hostname = hbttdb1
uname -m = x86_64
uname -r = 2.6.32-279.el6.x86_64
uname -s = Linux
uname -v = #1 SMP Wed Jun 13 18:24:36 EDT 2012
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = x86_64
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /usr/lib64/qt-3.3/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /sbin
PATH: /bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /root/bin
PATH: /data/oracle/app/oracle/proct/11.2.0/bin
PATH: .

## ----------- ##
## Core tests. ##
## ----------- ##
configure:2894: checking build system type
configure:2908: result: x86_64-unknown-linux-gnu
configure:2928: checking host system type
configure:2941: result: x86_64-unknown-linux-gnu
configure:3053: checking for --enable-universalsdk
configure:3100: result: no
configure:3123: checking for --with-universal-archs
configure:3138: result: no
configure:3288: checking MACHDEP
configure:3494: result: linux
configure:3518: checking for --without-gcc
configure:3541: result: no
configure:3665: checking for gcc
configure:3681: found /usr/bin/gcc
configure:3692: result: gcc
configure:3921: checking for C compiler version
configure:3930: gcc --version >&5
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for ing conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:3941: $? = 0
configure:3930: gcc -v >&5
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=Red Hat Bugzilla Main Page --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)
configure:3941: $? = 0
configure:3930: gcc -V >&5
gcc: '-V' option must have argument
configure:3941: $? = 1
configure:3930: gcc -qversion >&5
gcc: unrecognized option '-qversion'
gcc: no input files
configure:3941: $? = 1
configure:3961: checking whether the C compiler works
configure:3983: gcc conftest.c >&5
configure:3987: $? = 0
configure:4035: result: yes
configure:4038: checking for C compiler default output file name
configure:4040: result: a.out
configure:4046: checking for suffix of executables
configure:4053: gcc -o conftest conftest.c >&5
configure:4057: $? = 0
configure:4079: result:
configure:4101: checking whether we are cross compiling
configure:4109: gcc -o conftest conftest.c >&5
In file included from /usr/include/stdio.h:75,
from conftest.c:11:
/usr/include/libio.h:332: error: expected specifier-qualifier-list before 'size_t'
/usr/include/libio.h:364: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/libio.h:373: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/libio.h:495: error: expected '=', ',', ';', 'asm' or '__attribute__' before '_IO_sgetn'
In file included from conftest.c:11:
/usr/include/stdio.h:318: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/stdio.h:324: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/stdio.h:336: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/stdio.h:343: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/stdio.h:385: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/stdio.h:387: error: format string argument not a string type
/usr/include/stdio.h:389: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/stdio.h:391: error: format string argument not a string type
/usr/include/stdio.h:661: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/stdio.h:664: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/stdio.h:674: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/stdio.h:704: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fread'
/usr/include/stdio.h:710: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fwrite'
/usr/include/stdio.h:732: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fread_unlocked'
/usr/include/stdio.h:734: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fwrite_unlocked'
configure:4113: $? = 1
configure:4120: ./conftest
./configure: line 4122: ./conftest: No such file or directory
configure:4124: $? = 127
configure:4131: error: in `/root/msk/py_workspace/py_setup/Python-3.4.4':
configure:4133: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-unknown-linux-gnu
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_MACHDEP_set=
ac_cv_env_MACHDEP_value=
ac_cv_env_PKG_CONFIG_LIBDIR_set=
ac_cv_env_PKG_CONFIG_LIBDIR_value=
ac_cv_env_PKG_CONFIG_PATH_set=
ac_cv_env_PKG_CONFIG_PATH_value=
ac_cv_env_PKG_CONFIG_set=
ac_cv_env_PKG_CONFIG_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=x86_64-unknown-linux-gnu
ac_cv_prog_ac_ct_CC=gcc
## ----------------- ##
## Output variables. ##
## ----------------- ##
ABIFLAGS=''
AR=''
ARCH_RUN_32BIT=''
ARFLAGS=''
ASDLGEN=''
BASECFLAGS=''
BASECPPFLAGS=''
BLDLIBRARY=''
BLDSHARED=''
BUILDEXEEXT=''
CC='gcc'
CCSHARED=''
CFLAGS=''
CFLAGSFORSHARED=''
CFLAGS_NODIST=''
CONFIGURE_MACOSX_DEPLOYMENT_TARGET=''
CONFIG_ARGS=''
CPP=''
CPPFLAGS=''
CXX=''
DEFS=''
DLINCLDIR=''
DLLLIBRARY=''
DYNLOADFILE=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
ENSUREPIP=''
EXEEXT=''
EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
EXT_SUFFIX=''
FRAMEWORKALTINSTALLFIRST=''
FRAMEWORKALTINSTALLLAST=''
FRAMEWORKINSTALLAPPSPREFIX=''
FRAMEWORKINSTALLFIRST=''
FRAMEWORKINSTALLLAST=''
FRAMEWORKPYTHONW=''
FRAMEWORKUNIXTOOLSPREFIX='/usr/local'
GNULD=''
GREP=''
HAS_HG='no-repository'
HAVE_GETHOSTBYNAME=''
HAVE_GETHOSTBYNAME_R=''
HAVE_GETHOSTBYNAME_R_3_ARG=''
HAVE_GETHOSTBYNAME_R_5_ARG=''
HAVE_GETHOSTBYNAME_R_6_ARG=''
HGBRANCH=''
HGTAG=''
HGVERSION=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
INSTSONAME=''
LDCXXSHARED=''
LDFLAGS=''
LDLAST=''
LDLIBRARY=''
LDLIBRARYDIR=''
LDSHARED=''
LDVERSION=''
LIBC=''
LIBFFI_INCLUDEDIR=''
LIBM=''
LIBOBJS=''
LIBPL=''
LIBRARY=''
LIBS=''
LIBTOOL_CRUFT=''
LINKCC=''
LINKFORSHARED=''
LIPO_32BIT_FLAGS=''
LN=''
LTLIBOBJS=''
MACHDEP='linux'
MACHDEP_OBJS=''
MAINCC=''
MKDIR_P=''
MULTIARCH=''
NO_AS_NEEDED=''
OBJEXT=''
OPT=''
OTHER_LIBTOOL_OPT=''
PACKAGE_BUGREPORT='List of issues - Python tracker'
PACKAGE_NAME='python'
PACKAGE_STRING='python 3.4'
PACKAGE_TARNAME='python'
PACKAGE_URL=''
PACKAGE_VERSION='3.4'
PATH_SEPARATOR=':'
PKG_CONFIG=''
PKG_CONFIG_LIBDIR=''
PKG_CONFIG_PATH=''
PLATDIR='plat-linux'
PY3LIBRARY=''
PYTHON=''
PYTHONFRAMEWORK=''
PYTHONFRAMEWORKDIR='no-framework'
PYTHONFRAMEWORKIDENTIFIER='org.python.python'
PYTHONFRAMEWORKINSTALLDIR=''
PYTHONFRAMEWORKPREFIX=''
PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
PY_ENABLE_SHARED=''
RANLIB=''
READELF=''
RUNSHARED=''
SGI_ABI=''
SHELL='/bin/sh'
SHLIBS=''
SHLIB_SUFFIX=''
SIGNAL_OBJS=''
SOABI=''
SOVERSION='1.0'
SRCDIRS=''
TCLTK_INCLUDES=''
TCLTK_LIBS=''
THREADHEADERS=''
THREADOBJ=''
TRUE=''
UNIVERSALSDK=''
UNIVERSAL_ARCH_FLAGS=''
USE_INLINE=''
USE_SIGNAL_MODULE=''
USE_THREAD_MODULE=''
VERSION='3.4'
_PYTHON_HOST_PLATFORM=''
ac_ct_AR=''
ac_ct_CC='gcc'
ac_ct_CXX=''
ac_ct_READELF=''
bindir='${exec_prefix}/bin'
build='x86_64-unknown-linux-gnu'
build_alias=''
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='unknown'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='x86_64-unknown-linux-gnu'
host_alias=''
host_cpu='x86_64'
host_os='linux-gnu'
host_vendor='unknown'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define _GNU_SOURCE 1
#define _NETBSD_SOURCE 1
#define __BSD_VISIBLE 1
#define _BSD_TYPES 1
#define _DARWIN_C_SOURCE 1
#define _XOPEN_SOURCE 700
#define _XOPEN_SOURCE_EXTENDED 1
#define _POSIX_C_SOURCE 200809L
configure: exit 1

⑸ 怎样用python算24点

这个参考一下:是csdn的
输入4个数字, 输出所有用加减乘除结果为24的表达式. 代码如下:

def isEqual(num1, num2):
return
abs(num1 - num2) < 1e-5;
# End of isEqual().
http://blog.csdn.net/jq0123/article/details/6092435

热点内容
给定一个算法 发布:2024-05-19 17:50:08 浏览:863
恋爱生物种离线缓存 发布:2024-05-19 17:49:15 浏览:578
卡巴斯基服务器如何连接外网更新 发布:2024-05-19 17:42:06 浏览:559
手机虚荣怎么连接服务器 发布:2024-05-19 17:41:47 浏览:729
linux修改保存文件 发布:2024-05-19 17:30:38 浏览:665
网络有你脚本 发布:2024-05-19 17:29:55 浏览:769
黎明我的世界服务器 发布:2024-05-19 17:17:34 浏览:538
雷神g50如何设置安卓原生模式 发布:2024-05-19 16:50:04 浏览:120
c语言小数四舍五入 发布:2024-05-19 16:23:28 浏览:525
数据库被注入攻击 发布:2024-05-19 16:21:31 浏览:835