python报错:Can‘t find a default Python.

当遇到这样的问题的时候,我是用py 001.py运行001.py文件的,显示错误。

而我直接用python 001.py,运行py文件就没有报错,真奇怪!

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
This is Python version 3.1.5 ============================ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Python Software Foundation. All rights reserved. Python 3.x is a new version of the language, which is incompatible with the 2.x line of releases. The language is mostly the same, but many details, especially how built-in objects like dictionaries and strings work, have changed considerably, and a lot of deprecated features have finally been removed. Build Instructions ------------------ On Unix, Linux, BSD, OSX, and Cygwin: ./configure make make test sudo make install This will install Python as python3. You can pass many options to the configure script; run "./configure --help" to find out more. On OSX and Cygwin, the executable is called python.exe; elsewhere it's just python. On Mac OS X, if you have configured Python with --enable-framework, you should use "make frameworkinstall" to do the installation. Note that this installs the Python executable in a place that is not normally on your PATH, you may want to set up a symlink in /usr/local/bin. On Windows, see PCbuild/readme.txt. If you wish, you can create a subdirectory and invoke configure from there. For example: mkdir debug cd debug ../configure --with-pydebug make make test (This will fail if you *also* built at the top-level directory. You should do a "make clean" at the toplevel first.) What's New ---------- We try to have a comprehensive overview of the changes in the "What's New in Python 3.1" document, found at http://docs.python.org/3.1/whatsnew/3.1.html For a more detailed change log, read Misc/NEWS (though this file, too, is incomplete, and also doesn't list anything merged in from the 2.7 release under development). If you want to install multiple versions of Python see the section below entitled "Installing multiple versions". Documentation ------------- Documentation for Python 3.1 is online, updated twice a day: http://docs.python.org/3.1/ All documentation is also available online at the Python web site (http://docs.python.org/, see below). It is available online for occasional reference, or can be downloaded in many formats for faster access. The documentation is downloadable in HTML, PostScript, PDF, LaTeX (through 2.5), and reStructuredText (2.6+) formats; the LaTeX and reStructuredText versions are primarily for documentation authors, translators, and people with special formatting requirements. Converting From Python 2.x to 3.x --------------------------------- Python starting with 2.6 will contain features to help locating code that needs to be changed, such as optional warnings when deprecated features are used, and backported versions of certain key Python 3.x features. A source-to-source translation tool, "2to3", can take care of the mundane task of converting large amounts of source code. It is not a complete solution but is complemented by the deprecation warnings in 2.6. See http://docs.python.org/py3k/library/2to3.html for more information. Testing ------- To test the interpreter, type "make test" in the top-level directory. This runs the test set twice (once with no compiled files, once with the compiled files left by the previous test run). The test set produces some output. You can generally ignore the messages about skipped tests due to optional features which can't be imported. If a message is printed about a failed test or a traceback or core dump is produced, something is wrong. On some Linux systems (those that are not yet using glibc 6), test_strftime fails due to a non-standard implementation of strftime() in the C library. Please ignore this, or upgrade to glibc version 6. By default, tests are prevented from overusing resources like disk space and memory. To enable these tests, run "make testall". IMPORTANT: If the tests fail and you decide to mail a bug report, *don't* include the output of "make test". It is useless. Run the failing test manually, as follows: ./python Lib/test/regrtest.py -v test_whatever (substituting the top of the source tree for '.' if you built in a different directory). This runs the test in verbose mode. Installing multiple versions ---------------------------- On Unix and Mac systems if you intend to install multiple versions of Python using the same installation prefix (--prefix argument to the configure script) you must take care that your primary python executable is not overwritten by the installation of a different version. All files and directories installed using "make altinstall" contain the major and minor version and can thus live side-by-side. "make install" also creates ${prefix}/bin/python3 which refers to ${prefix}/bin/pythonX.Y. If you intend to install multiple versions using the same prefix you must decide which version (if any) is your "primary" version. Install that version using "make install". Install all other versions using "make altinstall". For example, if you want to install Python 2.5, 2.6 and 3.0 with 2.6 being the primary version, you would execute "make install" in your 2.6 build directory and "make altinstall" in the others. Issue Tracker and Mailing List ------------------------------ We're soliciting bug reports about all aspects of the language. Fixes are also welcome, preferable in unified diff format. Please use the issue tracker: http://bugs.python.org/ If you're not sure whether you're dealing with a bug or a feature, use the mailing list: python-dev@python.org To subscribe to the list, use the mailman form: http://mail.python.org/mailman/listinfo/python-dev/ Proposals for enhancement ------------------------- If you have a proposal to change Python, you may want to send an email to the comp.lang.python or python-ideas mailing lists for inital feedback. A Python Enhancement Proposal (PEP) may be submitted if your idea gains ground. All current PEPs, as well as guidelines for submitting a new PEP, are listed at http://www.python.org/dev/peps/. Release Schedule ---------------- See PEP 375 for release details: http://www.python.org/dev/peps/pep-0375/ Copyright and License Information --------------------------------- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Python Software Foundation. All rights reserved. Copyright (c) 2000 BeOpen.com. All rights reserved. Copyright (c) 1995-2001 Corporation for National Research Initiatives. All rights reserved. Copyright (c) 1991-1995 Stichting Mathematisch Centrum. All rights reserved. See the file "LICENSE" for information on the history of this software, terms & conditions for usage, and a DISCLAIMER OF ALL WARRANTIES. This Python distribution contains *no* GNU General Public License (GPL) code, so it may be used in proprietary projects. There are interfaces to some GNU code but these are entirely optional. All trademarks referenced herein are property of their respective holders.
目录: 01 教程.png 01.01 2.x与3.x版本区别.png 02 基础语法.png 02.01 命令行参数.png 03 基本数据类型.png 03.01 数据类型转换 int() 函数.png 03.02 数据类型转换 float() 函数.png 03.03 数据类型转换 complex() 函数.png 03.04 数据类型转换 str() 函数.png 03.05 数据类型转换 repr() 函数.png 03.06 数据类型转换 eval() 函数.png 03.07 数据类型转换 tuple 函数.png 03.08 数据类型转换 list()方法.png 03.09 数据类型转换 set() 函数.png 03.10 数据类型转换 dict() 函数.png 03.11 数据类型转换 frozenset() 函数.png 03.12 数据类型转换 chr() 函数.png 03.13 数据类型转换 ord() 函数.png 03.14 数据类型转换 hex() 函数.png 03.15 数据类型转换 oct() 函数.png 04 解释器.png 05 注释.png 06 运算符.png 07 数字(Number).png 07.01 数学函数 abs() 函数.png 07.02 数学函数 ceil() 函数.png 07.03 数学函数 exp() 函数.png 07.04 数学函数 fabs() 函数.png 07.05 数学函数 floor() 函数.png 07.06 数学函数 log() 函数.png 07.07 数学函数 log10() 函数.png 07.08 数学函数 max() 函数.png 07.09 数学函数 min() 函数.png 07.10 数学函数 modf() 函数.png 07.11 数学函数 pow() 函数.png 07.12 数学函数 round() 函数.png 07.13 数学函数 sqrt() 函数.png 07.14 随机数函数 choice() 函数.png 07.15 随机数函数 randrange() 函数.png 07.16 随机数函数 random() 函数.png 07.17 随机数函数 seed() 函数.png 07.18 随机数函数 shuffle() 函数.png 07.19 随机数函数 uniform() 函数.png 07.20 三角函数 acos() 函数.png 07.21 三角函数 asin() 函数.png 07.22 三角函数 atan() 函数.png 07.23 三角函数 atan2() 函数.png 07.24 三角函数 cos() 函数.png 07.25 三角函数 hypot() 函数.png 07.26 三角函数 sin() 函数.png 07.27 三角函数 tan() 函数.png 07.28 三角函数 degrees() 函数.png 07.29 三角函数 radians() 函数.png 08 字符串.png 08.01 字符串内建函数 capitalize()方法.png 08.02 字符串内建函数 center()方法.png 08.03 字符串内建函数 count()方法.png 08.04 字符串内建函数 bytes.decode()方法.png 08.05 字符串内建函数 encode()方法.png 08.06 字符串内建函数 endswith()方法.png 08.07 字符串内建函数 expandtabs()方法.png 08.08 字符串内建函数 find()方法.png 08.09 字符串内建函数 index()方法.png 08.10 字符串内建函数 isalnum()方法.png 08.11 字符串内建函数 isalpha()方法.png 08.12 字符串内建函数 isdigit()方法.png 08.13 字符串内建函数 islower()方法.png 08.14 字符串内建函数 isnumeric()方法.png 08.15 字符串内建函数 isspace()方法.png 08.16 字符串内建函数 istitle()方法.png 08.17 字符串内建函数 isupper()方法.png 08.18 字符串内建函数 join()方法.png 08.19 字符串内建函数 len()方法.png 08.20 字符串内建函数 ljust()方法.png 08.21 字符串内建函数 lower()方法.png 08.22 字符串内建函数 lstrip()方法.png 08.23 字符串内建函数 maketrans()方法.png 08.24 字符串内建函数 max()方法.png 08.25 字符串内建函数 min()方法.png 08.26 字符串内建函数 replace()方法.png 08.27 字符串内建函数 rfind()方法.png 08.28 字符串内建函数 rindex()方法.png 08.29 字符串内建函数 rjust()方法.png 08.30 字符串内建函数 rstrip()方法.png 08.31 字符串内建函数 split()方法.png 08.32 字符串内建函数 splitlines()方法.png 08.33 字符串内建函数 startswith()方法.png 08.34 字符串内建函数 strip()方法.png 08.35 字符串内建函数 swapcase()方法.png 08.36 字符串内建函数 title()方法.png 08.37 字符串内建函数 translate()方法.png 08.38 字符串内建函数 upper()方法.png 08.39 字符串内建函数 zfill()方法.png 08.40 字符串内建函数 isdecimal()方法.png 09 列表.png 09.01 列表函数 List len()方法.png 09.02 列表函数 List max()方法.png 09.03 列表函数 List min()方法.png 09.04 列表函数 List list()方法.png 09.05 列表方法 List append()方法.png 09.06 列表方法 List count()方法.png 09.07 列表方法 List extend()方法.png 09.08 列表方法 List index()方法.png 09.09 列表方法 List insert()方法.png 09.10 列表方法 List pop()方法.png 09.11 列表方法 List remove()方法.png 09.12 列表方法 List reverse()方法.png 09.13 列表方法 List sort()方法.png 09.14 列表方法 List clear()方法.png 09.15 列表方法 List copy()方法.png 10 元组.png 11 字典.png 11.01 字典 clear()方法.png 11.02 字典 copy()方法.png 11.02.01 直接赋值、浅拷贝和深度拷贝解析.png 11.03 字典 fromkeys()方法.png 11.04 字典 get() 方法.png 11.05 字典 in 操作符.png 11.06 字典 items() 方法.png 11.07 字典 keys() 方法.png 11.08 字典 setdefault() 方法.png 11.09 字典 update() 方法.png 11.10 字典 values() 方法.png 11.11 字典 pop() 方法.png 11.12 字典 popitem() 方法.png 12 编程第一步.png 13 条件控制.png 14 循环语句.png 15 迭代器与生成器.png 16 函数.png 17 数据结构.png 18 模块.png 19 输入和输出.png 20 File 方法.png 20.01 File close() 方法.png 20.02 File flush() 方法.png 20.03 File fileno() 方法.png 20.04 File isatty() 方法.png 20.05 File next() 方法.png 20.06 File read() 方法.png 20.07 File readline() 方法.png 20.08 File readlines() 方法.png 20.09 File seek() 方法.png 20.10 File tell() 方法.png 20.11 File truncate() 方法.png 20.12 File write() 方法.png 20.13 File writelines() 方法.png 21 OS 文件_目录方法.png 21.01 os.access() 方法.png 21.02 os.chdir() 方法.png 21.03 os.chflags() 方法.png 21.04 os.chmod() 方法.png 21.05 os.chown() 方法.png 21.06 os.chroot() 方法.png 21.07 os.close() 方法.png 21.08 os.closerange() 方法.png 21.09 os.dup() 方法.png 21.10 os.dup2() 方法.png 21.11 os.fchdir() 方法.png 21.12 os.fchmod() 方法.png 21.13 os.fchown() 方法.png 21.14 os.fdatasync() 方法.png 21.15 os.fdopen() 方法.png 21.16 os.fpathconf() 方法.png 21.17 os.fstat() 方法.png 21.18 os.fstatvfs() 方法.png 21.19 os.fsync() 方法.png 21.20 os.ftruncate() 方法.png 21.21 os.getcwd() 方法.png 21.22 os.getcwdu() 方法.png 21.23 os.isatty() 方法.png 21.24 os.lchflags() 方法.png 21.25 os.lchmod() 方法.png 21.26 os.lchown() 方法.png 21.27 os.link() 方法.png 21.28 os.listdir() 方法.png 21.29 os.lseek() 方法.png 21.30 os.lstat() 方法.png 21.31 os.major() 方法.png 21.32 os.makedev() 方法.png 21.33 os.makedirs() 方法.png 21.34 os.minor() 方法.png 21.35 os.mkdir() 方法.png 21.36 os.mkfifo() 方法.png 21.37 os.mknod() 方法.png 21.38 os.open() 方法.png 21.39 os.openpty() 方法.png 21.40 os.pathconf() 方法.png 21.41 os.pipe() 方法.png 21.42 os.popen() 方法.png 21.43 os.read() 方法.png 21.44 os.readlink() 方法.png 21.45 os.remove() 方法.png 21.46 os.removedirs() 方法.png 21.47 os.rename() 方法.png 21.48 os.renames() 方法.png 21.49 os.rmdir() 方法.png 21.50 os.stat() 方法.png 21.51 os.stat_float_times() 方法.png 21.52 os.statvfs() 方法.png 21.53 os.symlink() 方法.png 21.54 os.tcgetpgrp() 方法.png 21.55 os.tcsetpgrp() 方法.png 21.56 os.ttyname() 方法.png 21.57 os.unlink() 方法.png 21.58 os.utime() 方法.png 21.59 os.walk() 方法.png 21.60 os.write() 方法.png 22 错误和异常.png 23 面向对象.png 24 标准库概览.png 25 实例.png 25.01 Hello World 实例.png 25.02 数字求和.png 25.03 平方根.png 25.04 二次方程.png 25.05 计算三角形的面积.png 25.06 随机数生成.png 25.07 摄氏温度转华氏温度.png 25.08 交换变量.png 25.09 if 语句.png 25.10 判断字符串是否为数字.png 25.11 判断奇数偶数.png 25.12 判断闰年.png 25.13 获取最大值函数.png 25.14 质数判断.png 25.15 输出指定范围内的素数.png 25.16 阶乘实例.png 25.17 九九乘法表.png 25.18 斐波那契数列.png 25.19 阿姆斯特朗数.png 25.20 十进制转二进制、八进制、十六进制.png 25.21 ASCII码与字符相互转换.png 25.22 最大公约数算法.png 25.23 最小公倍数算法.png 25.24 简单计算器实现.png 25.25 生成日历.png 25.26 使用递归斐波那契数列.png 25.27 文件 IO.png 25.28 字符串判断.png 25.29 字符串大小写转换.png 25.30 计算每个月天数.png 25.31 获取昨天日期.png 25.32 list 常用操作.png 26 正则表达式.png 27 CGI编程.png 28 MySQL 数据库连接.png 29 网络编程.png 30 SMTP发送邮件.png 31 多线程.png 32 XML解析.png 33 JSON 数据解析.png 34 日期和时间.png 34.01 time clock()方法.png 34.02 time mktime()方法.png 34.03 time tzset()方法.png 35 内置函数.png 35.01 abs() 函数.png 35.02 all() 函数.png 35.03 any() 函数.png 35.04 ascii() 函数.png 35.05 bin() 函数.png 35.06 bool() 函数.png 35.07 bytearray() 函数.png 35.08 bytes 函数.png 35.09 callable() 函数.png 35.10 chr() 函数.png 35.11 classmethod 修饰符.png 35.12 compile() 函数.png 35.13 complex() 函数.png 35.14 delattr() 函数.png 35.15 dict() 函数.png 35.16 dir() 函数.png 35.17 divmod() 函数.png 35.18 enumerate() 函数.png 35.19 eval() 函数.png 35.20 exec 函数.png 35.21 filter() 函数.png 35.22 float() 函数.png 35.23 format 格式化函数.png 35.24 frozenset() 函数.png 35.25 getattr() 函数.png 35.26 globals() 函数.png 35.27 hasattr() 函数.png 35.28 hash() 函数.png 35.29 help() 函数.png 35.30 hex() 函数.png 35.31 id() 函数.png 35.32 input() 函数.png 35.33 int() 函数.png 35.34 isinstance() 函数.png 35.35 issubclass() 函数.png 35.36 iter() 函数.png 35.37 len()方法.png 35.38 list()方法.png 35.39 locals() 函数.png 35.40 map() 函数.png 35.41 max() 函数.png 35.42 memoryview() 函数.png 35.43 min() 函数.png 35.44 next() 函数.png 35.45 oct() 函数.png 35.46 open() 函数.png 35.47 ord() 函数.png 35.48 pow() 函数.png 35.49 print() 函数.png 35.50 property() 函数.png 35.51 range() 函数用法.png 35.52 repr() 函数.png 35.53 reversed 函数.png 35.54 round() 函数.png 35.55 set() 函数.png 35.56 setattr() 函数.png 35.57 slice() 函数.png 35.58 sorted() 函数.png 35.59 staticmethod() 函数.png 35.60 str() 函数.png 35.61 sum() 函数.png 35.62 super() 函数.png 35.63 tuple 函数.png 35.64 type() 函数.png 35.65 vars() 函数.png 35.66 zip() 函数.png 35.67 __import__() 函数.png

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值